You are here

public function GuardInterface::allowed in State Machine 8

Checks whether the given transition is allowed.

Parameters

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

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

\Drupal\Core\Entity\EntityInterface $entity: The parent entity.

Return value

bool TRUE if the transition is allowed, FALSE otherwise.

2 methods override GuardInterface::allowed()
FulfillmentGuard::allowed in tests/modules/state_machine_test/src/Guard/FulfillmentGuard.php
Checks whether the given transition is allowed.
GenericGuard::allowed in tests/modules/state_machine_test/src/Guard/GenericGuard.php
Checks whether the given transition is allowed.

File

src/Guard/GuardInterface.php, line 33

Class

GuardInterface
Defines the interface for guards.

Namespace

Drupal\state_machine\Guard

Code

public function allowed(WorkflowTransition $transition, WorkflowInterface $workflow, EntityInterface $entity);