You are here

protected function EntityReferenceImportProcessor::processResults in YAML Content 8.2

Process entity ID results into expected content structure.

Parameters

array $import_data: Import data as loaded form a content file.

array $result_set: The result data identified by the executed query.

1 call to EntityReferenceImportProcessor::processResults()
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 174

Class

EntityReferenceImportProcessor
Import processor to support entity queries and references.

Namespace

Drupal\yaml_content\Plugin\YamlContent

Code

protected function processResults(array &$import_data, array $result_set) {

  // Format and append entity reference value.
  foreach ($result_set as $entity_id) {
    $import_data[] = [
      'target_id' => $entity_id,
    ];
  }
}