You are here

public function WorkflowConfigTransitionInterface::isAllowed in Workflow 8

Determines if the current transition between 2 states is allowed.

This is checked in the following locations:

  • in settings;
  • in permissions;
  • by permission hooks, implemented by other modules.

Parameters

\Drupal\user\UserInterface $user: The user to act upon. May have the custom WORKFLOW_ROLE_AUTHOR_RID role.

bool $force: Indicates if the transition must be forced(E.g., by cron, rules).

Return value

bool TRUE if OK, else FALSE.

2 methods override WorkflowConfigTransitionInterface::isAllowed()
WorkflowConfigTransition::isAllowed in src/Entity/WorkflowConfigTransition.php
Determines if the current transition between 2 states is allowed.
WorkflowTransition::isAllowed in src/Entity/WorkflowTransition.php
Determines if the current transition between 2 states is allowed.

File

src/Entity/WorkflowConfigTransitionInterface.php, line 33

Class

WorkflowConfigTransitionInterface
Defines a common interface for Workflow*Transition* objects.

Namespace

Drupal\workflow\Entity

Code

public function isAllowed(UserInterface $user, $force = FALSE);