class ModerationStateConstraint

Same name in other branches
  1. 9 core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraint
  2. 8.9.x core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraint
  3. 11.x core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraint

Verifies that nodes have a valid moderation state.

Hierarchy

  • class \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of ModerationStateConstraint

File

core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php, line 12

Namespace

Drupal\content_moderation\Plugin\Validation\Constraint
View source
class ModerationStateConstraint extends SymfonyConstraint {
    public $message = 'Invalid state transition from %from to %to';
    public $invalidStateMessage = 'State %state does not exist on %workflow workflow';
    public $invalidTransitionAccess = 'You do not have access to transition from %original_state to %new_state';

}

Members


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.