You are here

TransitionAccessConstraint.php in Scheduler content moderation integration 8

File

src/Plugin/Validation/Constraint/TransitionAccessConstraint.php
View source
<?php

namespace Drupal\scheduler_content_moderation_integration\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Validates content moderation transition access.
 *
 * @Constraint(
 *   id = "SchedulerModerationTransitionAccess",
 *   label = @Translation("Scheduler content moderation transition access validation", context = "Validation"),
 *   type = "entity:node"
 * )
 */
class TransitionAccessConstraint extends Constraint {

  /**
   * No access message.
   *
   * @var string
   */
  public $noAccessMessage = 'You do not have access to transition from %original_state to %new_state';

}

Classes

Namesort descending Description
TransitionAccessConstraint Validates content moderation transition access.