You are here

public function EntityImportEvent::__construct in YAML Content 8

Same name and namespace in other branches
  1. 8.2 src/Event/EntityImportEvent.php \Drupal\yaml_content\Event\EntityImportEvent::__construct()

Constructs a yaml content entity import event object.

Parameters

\Drupal\yaml_content\ContentLoader\ContentLoaderInterface $loader: The active Content Loader that triggered the event.

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The field definition for the field being populated.

array $content_data: The parsed content loaded from the content file to be loaded into the entity field.

Overrides DataImportEvent::__construct

File

src/Event/EntityImportEvent.php, line 31

Class

EntityImportEvent
Wraps a yaml content field import event for event listeners.

Namespace

Drupal\yaml_content\Event

Code

public function __construct(ContentLoaderInterface $loader, EntityTypeInterface $entity_type, array $content_data) {
  parent::__construct($loader, $content_data);
  $this->entityType = $entity_type;
}