You are here

protected function EntityReferenceImportProcessor::noResults in YAML Content 8.2

Handle behavior when no matches were found.

Throws

\Drupal\yaml_content\Plugin\YamlContent\MissingDataException

File

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

Class

EntityReferenceImportProcessor
Import processor to support entity queries and references.

Namespace

Drupal\yaml_content\Plugin\YamlContent

Code

protected function noResults() {
  $entity_type = $this->configuration['entity_type'];
  $filters = $this->configuration['filters'];
  $error = 'Unable to find referenced content of type %type matching: @filters';
  throw new MissingDataException(__CLASS__ . ': ' . $this
    ->t($error, [
    '%type' => $entity_type,
    '@filters' => print_r($filters, TRUE),
  ]));
}