public function ContentModerationStateChangedEvent::__construct in Workbench Email 2.x
Same name and namespace in other branches
- 8 src/EventSubscriber/ContentModerationStateChangedEvent.php \Drupal\workbench_email\EventSubscriber\ContentModerationStateChangedEvent::__construct()
Create a new ContentModerationStateChangedEvent.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $moderated_entity: The entity that is being moderated.
string $new_state: The new state the content is moving to.
string $original_state: The original state of the content, before the change was made.
string $workflow: The ID of the workflow that allowed the state change.
File
- src/
EventSubscriber/ ContentModerationStateChangedEvent.php, line 55
Class
- ContentModerationStateChangedEvent
- Defines content moderation state change events.
Namespace
Drupal\workbench_email\EventSubscriberCode
public function __construct(ContentEntityInterface $moderated_entity, $new_state, $original_state, $workflow) {
$this->moderatedEntity = $moderated_entity;
$this->newState = $new_state;
$this->originalState = $original_state;
$this->workflow = $workflow;
}