public function FieldImportEvent::__construct in YAML Content 8.2
Same name and namespace in other branches
- 8 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\FieldDefinitionInterface $field_definition: 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/ 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, FieldDefinitionInterface $field_definition, array $content_data) {
parent::__construct($loader, $content_data);
$this->entity = $entity;
$this->fieldDefinition = $field_definition;
}