diff --git a/core/lib/Drupal/Core/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Entity/Query/QueryFactory.php index 4a382fd..5cfda2b 100644 --- a/core/lib/Drupal/Core/Entity/Query/QueryFactory.php +++ b/core/lib/Drupal/Core/Entity/Query/QueryFactory.php @@ -14,16 +14,16 @@ /** * Factory class Creating entity query objects. * - * This class is marked as final since it should not be overridden in the - * container. EntityStorageBase::getQuery() accesses the storages query service - * directly without using this factory. + * This class should not be overridden in the container. + * EntityStorageBase::getQuery() accesses the storages query service directly + * without using this factory. * * @see \Drupal\Core\Entity\EntityStorageBase::getQuery() * * @todo https://www.drupal.org/node/2389335 remove entity.query service and * replace with using the entity storage's getQuery() method. */ -final class QueryFactory implements ContainerAwareInterface { +class QueryFactory implements ContainerAwareInterface { use ContainerAwareTrait; @@ -57,8 +57,7 @@ public function __construct(EntityManagerInterface $entity_manager) { * The query object that can query the given entity type. */ public function get($entity_type_id, $conjunction = 'AND') { - $service_name = $this->entityManager->getStorage($entity_type_id)->getQueryServiceName(); - return $this->container->get($service_name)->get($this->entityManager->getDefinition($entity_type_id), $conjunction); + return $this->entityManager->getStorage($entity_type_id)->getQuery($conjunction); } /**