public ConfigManager::loadConfigEntityByName($name)
Loads a configuration entity using the configuration name.
string $name: The configuration object name.
\Drupal\Core\Entity\EntityInterface|null The configuration entity or NULL if it does not exist.
Overrides ConfigManagerInterface::loadConfigEntityByName
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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!ConfigManager.php/function/ConfigManager::loadConfigEntityByName/8.1.x