function ConfigEntityBase::loadOverrideFree
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::loadOverrideFree()
Loads one entity in their original form without overrides.
Parameters
string $id: The ID of the entity to load.
Return value
static|null An entity object. NULL if no matching entity is found.
File
-
core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityBase.php, line 658
Class
- ConfigEntityBase
- Defines a base configuration entity class.
Namespace
Drupal\Core\Config\EntityCode
public static function loadOverrideFree(string $id) : ConfigEntityInterface|null {
$entity_type_repository = \Drupal::service('entity_type.repository');
$entity_type_manager = \Drupal::entityTypeManager();
$storage = $entity_type_manager->getStorage($entity_type_repository->getEntityTypeFromClass(static::class));
assert($storage instanceof ConfigEntityStorageInterface);
return $storage->loadOverrideFree($id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.