You are here

public function EntityPostSaveEvent::__construct in YAML Content 8

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

Constructs a yaml content entity post-save event object.

Parameters

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

\Drupal\Core\Entity\EntityInterface $entity: The entity loaded with content and saved.

array $content_data: The parsed content loaded from the content file resulting in this entity.

Overrides EventBase::__construct

File

src/Event/EntityPostSaveEvent.php, line 37

Class

EntityPostSaveEvent
Wraps a yaml content entity post-save event for event listeners.

Namespace

Drupal\yaml_content\Event

Code

public function __construct(ContentLoaderInterface $loader, EntityInterface $entity, array $content_data) {
  parent::__construct($loader);
  $this->entity = $entity;
  $this->contentData = $content_data;
}