You are here

public function StateItemInterface::applyTransition in State Machine 8

Applies the given transition, changing the current state.

Parameters

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

Throws

\InvalidArgumentException Thrown when the transition is not allowed.

1 method overrides StateItemInterface::applyTransition()
StateItem::applyTransition in src/Plugin/Field/FieldType/StateItem.php
Applies the given transition, changing the current state.

File

src/Plugin/Field/FieldType/StateItemInterface.php, line 86

Class

StateItemInterface
Defines the interface for state field items.

Namespace

Drupal\state_machine\Plugin\Field\FieldType

Code

public function applyTransition(WorkflowTransition $transition);