diff --git a/core/core.services.yml b/core/core.services.yml index 0e4aef5..b626181 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -595,7 +595,7 @@ services: - [setContainer, ['@service_container']] entity.query.config: class: Drupal\Core\Config\Entity\Query\QueryFactory - arguments: ['@config.storage', '@config.factory'] + arguments: ['@config.factory'] entity.query.sql: class: Drupal\Core\Entity\Query\Sql\QueryFactory arguments: ['@database'] diff --git a/core/lib/Drupal/Core/Config/Entity/Query/Query.php b/core/lib/Drupal/Core/Config/Entity/Query/Query.php index 7332680..5c923ab 100644 --- a/core/lib/Drupal/Core/Config/Entity/Query/Query.php +++ b/core/lib/Drupal/Core/Config/Entity/Query/Query.php @@ -20,13 +20,6 @@ class Query extends QueryBase implements QueryInterface { /** - * The config storage used by the config entity query. - * - * @var \Drupal\Core\Config\StorageInterface - */ - protected $configStorage; - - /** * The config factory used by the config entity query. * * @var \Drupal\Core\Config\ConfigFactoryInterface @@ -41,16 +34,13 @@ class Query extends QueryBase implements QueryInterface { * @param string $conjunction * - AND: all of the conditions on the query need to match. * - OR: at least one of the conditions on the query need to match. - * @param \Drupal\Core\Config\StorageInterface $config_storage - * The actual config storage which is used to list all config items. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param array $namespaces * List of potential namespaces of the classes belonging to this query. */ - function __construct(EntityTypeInterface $entity_type, $conjunction, StorageInterface $config_storage, ConfigFactoryInterface $config_factory, array $namespaces) { + function __construct(EntityTypeInterface $entity_type, $conjunction, ConfigFactoryInterface $config_factory, array $namespaces) { parent::__construct($entity_type, $conjunction, $namespaces); - $this->configStorage = $config_storage; $this->configFactory = $config_factory; } @@ -151,7 +141,7 @@ protected function loadRecords() { } // If no restrictions on IDs were found, we need to parse all records. else { - $names = $this->configStorage->listAll($prefix); + $names = $this->configFactory->listAll($prefix); } // Load the corresponding records. diff --git a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php index f239a66..71beb5d 100644 --- a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php +++ b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php @@ -21,13 +21,6 @@ class QueryFactory implements QueryFactoryInterface { /** - * The config storage used by the config entity query. - * - * @var \Drupal\Core\Config\StorageInterface; - */ - protected $configStorage; - - /** * The config factory used by the config entity query. * * @var \Drupal\Core\Config\ConfigFactoryInterface; @@ -50,7 +43,6 @@ class QueryFactory implements QueryFactoryInterface { * The config storage used by the config entity query. */ public function __construct(StorageInterface $config_storage, ConfigFactoryInterface $config_factory) { - $this->configStorage = $config_storage; $this->configFactory = $config_factory; $this->namespaces = QueryBase::getNamespaces($this); } @@ -59,7 +51,7 @@ public function __construct(StorageInterface $config_storage, ConfigFactoryInter * {@inheritdoc} */ public function get(EntityTypeInterface $entity_type, $conjunction) { - return new Query($entity_type, $conjunction, $this->configStorage, $this->configFactory, $this->namespaces); + return new Query($entity_type, $conjunction, $this->configFactory, $this->namespaces); } /**