public StateTransitionValidationInterface::userMayTransition(ModerationStateInterface $from, ModerationStateInterface $to, AccountInterface $user)
Determines if a user is allowed to transition from one state to another.
This method will also return FALSE if there is no transition between the specified states at all.
Parameters
\Drupal\content_moderation\ModerationStateInterface $from: The origin state.
\Drupal\content_moderation\ModerationStateInterface $to: The destination state.
\Drupal\Core\Session\AccountInterface $user: The user to validate.
Return value
bool TRUE if the given user may transition between those two states.
File
- core/modules/content_moderation/src/StateTransitionValidationInterface.php, line 56
Class
- StateTransitionValidationInterface
- Validates whether a certain state transition is allowed.
Namespace
Drupal\content_moderation
Code
public function userMayTransition(ModerationStateInterface $from, ModerationStateInterface $to, AccountInterface $user);
Please login to continue.