You are here

public function WorkbenchModerationTransitionEvent::__construct in Workbench Moderation 8.2

Same name and namespace in other branches
  1. 8 src/Event/WorkbenchModerationTransitionEvent.php \Drupal\workbench_moderation\Event\WorkbenchModerationTransitionEvent::__construct()

Creates a new WorkbenchModerationTransitionEvent instance.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity which was changed.

string $state_before: The state before the transition.

string $state_after: The state after the transition.

File

src/Event/WorkbenchModerationTransitionEvent.php, line 40

Class

WorkbenchModerationTransitionEvent

Namespace

Drupal\workbench_moderation\Event

Code

public function __construct(ContentEntityInterface $entity, $state_before, $state_after) {
  $this->entity = $entity;
  $this->stateBefore = $state_before;
  $this->stateAfter = $state_after;
}