You are here

public function WorkflowTransitionEvent::__construct in State Machine 8

Constructs a new WorkflowTransitionEvent object.

Parameters

\Drupal\state_machine\Plugin\Workflow\WorkflowTransition $transition: The transition.

\Drupal\state_machine\Plugin\Workflow\WorkflowInterface $workflow: The workflow.

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity.

string $field_name: The state field name.

File

src/Event/WorkflowTransitionEvent.php, line 55

Class

WorkflowTransitionEvent
Defines the workflow transition event.

Namespace

Drupal\state_machine\Event

Code

public function __construct(WorkflowTransition $transition, WorkflowInterface $workflow, ContentEntityInterface $entity, $field_name) {
  $this->transition = $transition;
  $this->workflow = $workflow;
  $this->entity = $entity;
  $this->fieldName = $field_name;
}