diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index c0318a0..a7eb48e 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -97,11 +97,11 @@ class ConfigStorageController implements EntityStorageControllerInterface, Entit protected $configStorage; /** - * The entity query object. + * The entity query factory. * - * @var \Drupal\Core\Entity\Query\QueryInterface + * @var \Drupal\Core\Entity\Query\QueryFactory */ - protected $entityQuery; + protected $entityQueryFactory; /** * Constructs a ConfigStorageController object. @@ -132,7 +132,7 @@ public function __construct($entity_type, array $entity_info, ConfigFactory $con $this->configFactory = $config_factory; $this->configStorage = $config_storage; - $this->entityQuery = $entity_query_factory->get($entity_type); + $this->entityQueryFactory = $entity_query_factory; } /** @@ -500,7 +500,7 @@ public function save(EntityInterface $entity) { protected function preSave(EntityInterface $entity) { // Ensure this entity's UUID does not exist with a different ID, regardless // of whether it's new or updated. - $matching_entities = $this->entityQuery + $matching_entities = $this->entityQueryFactory->get($this->entityType) ->condition('uuid', $entity->uuid()) ->execute(); $matched_entity = reset($matching_entities);