public ConfigManager::loadConfigEntityByName($name)
Loads a configuration entity using the configuration name.
Parameters
string $name: The configuration object name.
Return value
\Drupal\Core\Entity\EntityInterface|null The configuration entity or NULL if it does not exist.
Overrides ConfigManagerInterface::loadConfigEntityByName
File
- core/lib/Drupal/Core/Config/ConfigManager.php, line 109
Class
- ConfigManager
- The ConfigManager provides helper functions for the configuration system.
Namespace
Drupal\Core\Config
Code
1 2 3 4 5 6 7 8 9 | public function loadConfigEntityByName( $name ) { $entity_type_id = $this ->getEntityTypeIdByName( $name ); if ( $entity_type_id ) { $entity_type = $this ->entityManager->getDefinition( $entity_type_id ); $id = substr ( $name , strlen ( $entity_type ->getConfigPrefix()) + 1); return $this ->entityManager->getStorage( $entity_type_id )->load( $id ); } return NULL; } |
Please login to continue.