public function FieldImportEvent::__construct in YAML Content 8
Same name and namespace in other branches
- 8.2 src/Event/FieldImportEvent.php \Drupal\yaml_content\Event\FieldImportEvent::__construct()
Constructs a yaml content field import event object.
Parameters
\Drupal\yaml_content\ContentLoader\ContentLoaderInterface $loader: The active Content Loader that triggered the event.
\Drupal\Core\Entity\EntityInterface $entity: The entity being populated with field data.
\Drupal\Core\Field\FieldItemListInterface $field: The field object 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/ FieldImportEvent.php, line 41
Class
- FieldImportEvent
- Wraps a yaml content field import event for event listeners.
Namespace
Drupal\yaml_content\EventCode
public function __construct(ContentLoaderInterface $loader, EntityInterface $entity, FieldItemListInterface $field, array $content_data) {
parent::__construct($loader, $content_data);
$this->entity = $entity;
$this->field = $field;
}