You are here

protected function ConfigHelper::getConfigPrefixes in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::getConfigPrefixes()
  2. 8 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::getConfigPrefixes()
  3. 8.2 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::getConfigPrefixes()
  4. 8.3 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::getConfigPrefixes()

Returns a map of config entity type IDs to config prefixes.

Return value

string[] The config prefixes, keyed by the corresponding entity type ID.

2 calls to ConfigHelper::getConfigPrefixes()
ConfigHelper::delete in src/ConfigHelper.php
Overrides Drupal\Core\Config\FileStorage::delete().
ConfigHelper::getEntity in src/ConfigHelper.php
Transparently loads a config entity from the extension's config.

File

src/ConfigHelper.php, line 162

Class

ConfigHelper
A facade to assist with manipulating default config.

Namespace

Drupal\lightning_core

Code

protected function getConfigPrefixes() {
  $prefix_map = [];
  foreach ($this->entityTypeManager
    ->getDefinitions() as $id => $definition) {
    if ($definition instanceof ConfigEntityTypeInterface) {
      $prefix_map[$id] = $definition
        ->getConfigPrefix();
    }
  }
  return $prefix_map;
}