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