public function EntityReferenceImportProcessor::preprocess in YAML Content 8.2
Pre-process import data and manipulate it prior to content creation.
Parameters
array $import_data: The data array being processed for content import.
Overrides ImportProcessorBase::preprocess
File
- src/
Plugin/ YamlContent/ EntityReferenceImportProcessor.php, line 55
Class
- EntityReferenceImportProcessor
- Import processor to support entity queries and references.
Namespace
Drupal\yaml_content\Plugin\YamlContentCode
public function preprocess(array &$import_data) {
if (!$this->query) {
$this
->buildQuery();
}
$results = $this->query
->execute();
if (empty($results)) {
// @todo Handle empty result sets.
//return $this->noResults();
}
$this
->processResults($import_data, $results);
}