當前位置: 首頁>>代碼示例>>PHP>>正文


PHP StorageInterface::getCollectionName方法代碼示例

本文整理匯總了PHP中Drupal\Core\Config\StorageInterface::getCollectionName方法的典型用法代碼示例。如果您正苦於以下問題:PHP StorageInterface::getCollectionName方法的具體用法?PHP StorageInterface::getCollectionName怎麽用?PHP StorageInterface::getCollectionName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Drupal\Core\Config\StorageInterface的用法示例。


在下文中一共展示了StorageInterface::getCollectionName方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getActiveStorage

 /**
  * Gets the configuration storage that provides the active configuration.
  *
  * @param string $collection
  *   (optional) The configuration collection. Defaults to the default
  *   collection.
  *
  * @return \Drupal\Core\Config\StorageInterface
  *   The configuration storage that provides the default configuration.
  */
 protected function getActiveStorage($collection = StorageInterface::DEFAULT_COLLECTION)
 {
     if ($this->activeStorage->getCollectionName() != $collection) {
         $this->activeStorage = $this->activeStorage->createCollection($collection);
     }
     return $this->activeStorage;
 }
開發者ID:anatalsceo,項目名稱:en-classe,代碼行數:17,代碼來源:ConfigInstaller.php

示例2: getCollectionPrefix

 /**
  * Returns a cache ID prefix to use for the collection.
  *
  * @return string
  *   The cache ID prefix.
  */
 protected function getCollectionPrefix()
 {
     $collection = $this->storage->getCollectionName();
     if ($collection == StorageInterface::DEFAULT_COLLECTION) {
         return '';
     }
     return $collection . ':';
 }
開發者ID:davidsoloman,項目名稱:drupalconsole.com,代碼行數:14,代碼來源:CachedStorage.php

示例3: getConfigToCreate

 /**
  * Gets configuration data from the provided storage to create.
  *
  * @param StorageInterface $storage
  *   The configuration storage to read configuration from.
  * @param string $collection
  *  The configuration collection to use.
  * @param string $prefix
  *   (optional) Limit to configuration starting with the provided string.
  *
  * @return array
  *   An array of configuration data read from the source storage keyed by the
  *   configuration object name.
  */
 protected function getConfigToCreate(StorageInterface $storage, $collection, $prefix = '', StorageInterface $profile_storage = NULL)
 {
     if ($storage->getCollectionName() != $collection) {
         $storage = $storage->createCollection($collection);
     }
     $data = $storage->readMultiple($storage->listAll($prefix));
     // Check to see if the corresponding override storage has any overrides.
     if ($profile_storage) {
         if ($profile_storage->getCollectionName() != $collection) {
             $profile_storage = $profile_storage->createCollection($collection);
         }
         $data = $profile_storage->readMultiple(array_keys($data)) + $data;
     }
     return $data;
 }
開發者ID:dmyerson,項目名稱:d8ecs,代碼行數:29,代碼來源:ConfigInstaller.php

示例4: getCollectionName

 /**
  * {@inheritdoc}
  */
 public function getCollectionName()
 {
     return $this->baseStorage->getCollectionName();
 }
開發者ID:tedbow,項目名稱:scheduled-updates-demo,代碼行數:7,代碼來源:SourceStorage.php


注:本文中的Drupal\Core\Config\StorageInterface::getCollectionName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。