diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php index a0ecdcf..bdeed8c 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php @@ -21,7 +21,7 @@ class ConfigEntityListBuilder extends EntityListBuilder { * {@inheritdoc} */ public function load() { - $entities = parent::load(); + $entities = $this->storage->loadMultipleOriginal(); // Sort the entities using the entity class's sort() method. // See \Drupal\Core\Config\Entity\ConfigEntityBase::sort(). diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php index ca6ed7a..e8e23aa 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php @@ -420,4 +420,26 @@ public function updateFromStorageRecord(ConfigEntityInterface $entity, array $va return $entity; } + /** + * {@inheritdoc} + */ + public function loadOriginal($id) { + $old_state = $this->configFactory->getOverrideState(); + $this->configFactory->setOverrideState(FALSE); + $entity = $this->load($id); + $this->configFactory->setOverrideState($old_state); + return $entity; + } + + /** + * {@inheritdoc} + */ + public function loadMultipleOriginal(array $ids = NULL) { + $old_state = $this->configFactory->getOverrideState(); + $this->configFactory->setOverrideState(FALSE); + $entities = $this->loadMultiple($ids); + $this->configFactory->setOverrideState($old_state); + return $entities; + } + } diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php index 62c36f9..fb61301 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php @@ -65,4 +65,28 @@ public function createFromStorageRecord(array $values); */ public function updateFromStorageRecord(ConfigEntityInterface $entity, array $values); + /** + * Loads one entity in their original form without overrides. + * + * @param mixed $id + * The ID of the entity to load. + * + * @return \Drupal\Core\Entity\EntityInterface|null + * An entity object. NULL if no matching entity is found. + */ + public function loadOriginal($id); + + /** + * Loads one or more entities in their original form without overrides. + * + * @param $ids + * An array of entity IDs, or NULL to load all entities. + * + * @return \Drupal\Core\Entity\EntityInterface[] + * An array of entity objects indexed by their IDs. Returns an empty array + * if no matching entities found. + */ + public function loadMultipleOriginal(array $ids = NULL); + + }