You are here

protected function EntityReferenceImportProcessor::buildQuery in YAML Content 8.2

Build and prepare the the entity query with configured filters.

All filters are applied using the addQueryFilter() method. After executing this method, the entity query object itself is available from the $query property.

Return value

\Drupal\Core\Entity\Query\QueryInterface The prepared query object using defined configuration.

1 call to EntityReferenceImportProcessor::buildQuery()
EntityReferenceImportProcessor::preprocess in src/Plugin/YamlContent/EntityReferenceImportProcessor.php
Pre-process import data and manipulate it prior to content creation.

File

src/Plugin/YamlContent/EntityReferenceImportProcessor.php, line 80

Class

EntityReferenceImportProcessor
Import processor to support entity queries and references.

Namespace

Drupal\yaml_content\Plugin\YamlContent

Code

protected function buildQuery() {
  $entity_type = $this
    ->getContextValue('entity_type');
  $this->query = \Drupal::entityQuery($entity_type);
  $this
    ->applyFilters();
  return $this->query;
}