当前位置: 首页>>代码示例>>PHP>>正文


PHP StorageInterface::getComponentNames方法代码示例

本文整理汇总了PHP中Drupal\Core\Config\StorageInterface::getComponentNames方法的典型用法代码示例。如果您正苦于以下问题:PHP StorageInterface::getComponentNames方法的具体用法?PHP StorageInterface::getComponentNames怎么用?PHP StorageInterface::getComponentNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drupal\Core\Config\StorageInterface的用法示例。


在下文中一共展示了StorageInterface::getComponentNames方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getComponentNames

 /**
  * Get all configuration names and folders for a list of modules or themes.
  *
  * @param string $type
  *   Type of components: 'module' | 'theme' | 'profile'
  * @param array $list
  *   Array of theme or module names.
  *
  * @return array
  *   Configuration names provided by that component. In case of language
  *   module this list is extended with configured languages that have
  *   predefined names as well.
  */
 public function getComponentNames($type, array $list)
 {
     $names = array_unique(array_merge(array_keys($this->requiredInstallStorage->getComponentNames($type, $list)), array_keys($this->optionalInstallStorage->getComponentNames($type, $list))));
     if ($type == 'module' && in_array('language', $list)) {
         $languages = $this->predefinedConfiguredLanguages();
         $names = array_unique(array_merge($names, $languages));
     }
     return $names;
 }
开发者ID:sarahwillem,项目名称:OD8,代码行数:22,代码来源:LocaleDefaultConfigStorage.php

示例2: installStorageComponents

 /**
  * Get all configuration names and folders for a list of modules or themes.
  *
  * @param string $type
  *   Type of components: 'module' | 'theme' | 'profile'
  * @param array $list
  *   Array of theme or module names.
  *
  * @return array
  *   Configuration names provided by that component. In case of language
  *   module this list is extended with configured languages that have
  *   predefined names as well.
  */
 protected function installStorageComponents($type, array $list)
 {
     $names = array_keys($this->installStorage->getComponentNames($type, $list));
     if ($type == 'module' && in_array('language', $list)) {
         $languages = $this->predefinedConfiguredLanguages();
         $names = array_unique(array_merge($names, $languages));
     }
     return $names;
 }
开发者ID:Nikola-xiii,项目名称:d8intranet,代码行数:22,代码来源:LocaleConfigManager.php

示例3: listExtensionConfig

 /**
  * {@inheritdoc}
  */
 public function listExtensionConfig($extension)
 {
     // Convert to Component object if it is a string
     if (is_string($extension)) {
         $pathname = drupal_get_filename('module', $extension);
         $extension = new Extension(\Drupal::root(), 'module', $pathname);
     }
     return array_keys($this->extensionStorage->getComponentNames([$this->getExtensionName($extension) => $extension]));
 }
开发者ID:alexku,项目名称:travisintegrationtest,代码行数:12,代码来源:FeaturesManager.php

示例4: getComponentNames

 /**
  * Gets configuration names associated with components.
  *
  * @param array $components
  *   (optional) Array of component lists indexed by type. If not present or it
  *   is an empty array, it will update all components.
  *
  * @return array
  *   Array of configuration object names.
  */
 public function getComponentNames(array $components)
 {
     $components = array_filter($components);
     if ($components) {
         $names = array();
         foreach ($components as $type => $list) {
             // InstallStorage::getComponentNames returns a list of folders keyed by
             // config name.
             $names = array_merge($names, array_keys($this->installStorage->getComponentNames($type, $list)));
         }
         return $names;
     } else {
         return $this->installStorage->listAll();
     }
 }
开发者ID:alnutile,项目名称:drunatra,代码行数:25,代码来源:LocaleConfigManager.php


注:本文中的Drupal\Core\Config\StorageInterface::getComponentNames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。