awareness-1.0.0-alpha5/src/Cache/CacheFactoryAwareTrait.php

src/Cache/CacheFactoryAwareTrait.php
<?php

namespace Drupal\awareness\Cache;

/**
 * Trait for classes that utilize cache.factory service.
 */
trait CacheFactoryAwareTrait {

  /**
   * Returns the requested cache bin.
   *
   * @param string $bin
   *   (optional) The cache bin for which the cache object should be returned,
   *   defaults to 'default'.
   *
   * @return \Drupal\Core\Cache\CacheBackendInterface
   *   The cache object associated with the specified bin.
   */
  protected function getCacheBin($bin = 'default') {
    return \Drupal::cache($bin);
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc