You are here

WorkflowsFieldContraint.php in Workflows Field 8

Same filename and directory in other branches
  1. 2.x src/Plugin/Validation/Constraint/WorkflowsFieldContraint.php

File

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

namespace Drupal\workflows_field\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Validation constraint for the workflows field.
 *
 * @Constraint(
 *   id = "WorkflowsFieldConstraint",
 *   label = @Translation("WorkflowsFieldConstraint provider constraint", context = "Validation"),
 * )
 */
class WorkflowsFieldContraint extends Constraint {

  /**
   * Message displayed during an invalid transition.
   *
   * @var string
   */
  public $message = 'No transition exists to move from %previous_state to %state.';

  /**
   * Message displayed to users without appropriate permission for a transition.
   *
   * @var string
   */
  public $insufficientPermissionsTransition = 'You do not have sufficient permissions to use the %transition transition.';

}

Classes

Namesort descending Description
WorkflowsFieldContraint Validation constraint for the workflows field.