You are here

protected function Config::getEntityId in Helper 8

Get the entity ID for a configuration object.

Parameters

\Drupal\Core\Config\Entity\ConfigEntityStorageInterface $entity_storage: The configuration entity storage.

string $config_name: The configuration name.

Return value

string The entity ID.

1 call to Config::getEntityId()
Config::importFile in src/Config.php
Import a single configuration file.

File

src/Config.php, line 257

Class

Config
Provides helper for working with configuration.

Namespace

Drupal\helper

Code

protected function getEntityId(ConfigEntityStorageInterface $entity_storage, $config_name) {

  // getIDFromConfigName adds a dot but getConfigPrefix has a dot already.
  return $entity_storage::getIDFromConfigName($config_name, $entity_storage
    ->getEntityType()
    ->getConfigPrefix());
}