service entity.query in Drupal 8
Class
Drupal\Core\Entity\Query\QueryFactoryFile
- core/
core.services.yml - core/core.services.yml
View source
- class: Drupal\Core\Entity\Query\QueryFactory
- arguments:
- - '@entity_type.manager'
- calls:
- - [setContainer, ['@service_container']]
- deprecated: 'The "%service_id%" service is deprecated. Use the ''entity_type.manager'' service to get an entity type''s storage object and then call \Drupal\Core\Entity\EntityStorageInterface::getQuery() or \Drupal\Core\Entity\EntityStorageInterface::getAggregateQuery() instead. See https://www.drupal.org/node/2849874'