You are here

class DateRecurRulePartConstraint in Recurring Dates Field 3.1.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/Validation/Constraint/DateRecurRulePartConstraint.php \Drupal\date_recur\Plugin\Validation\Constraint\DateRecurRulePartConstraint
  2. 3.x src/Plugin/Validation/Constraint/DateRecurRulePartConstraint.php \Drupal\date_recur\Plugin\Validation\Constraint\DateRecurRulePartConstraint
  3. 3.0.x src/Plugin/Validation/Constraint/DateRecurRulePartConstraint.php \Drupal\date_recur\Plugin\Validation\Constraint\DateRecurRulePartConstraint

Restricts parts in RRULE to a pre-defined subset.

Plugin annotation


@Constraint(
  id = "DateRecurRuleParts",
  label = @Translation("Frequency and part restriction", context = "Validation"),
)

Hierarchy

Expanded class hierarchy of DateRecurRulePartConstraint

File

src/Plugin/Validation/Constraint/DateRecurRulePartConstraint.php, line 17

Namespace

Drupal\date_recur\Plugin\Validation\Constraint
View source
class DateRecurRulePartConstraint extends Constraint {

  /**
   * Violation message when a part is not permitted.
   *
   * @var string
   */
  public $disallowedPart = '%part is not a permitted part.';

  /**
   * Violation message when a frequency is not permitted.
   *
   * @var string
   */
  public $disallowedFrequency = '%frequency is not a permitted frequency.';

  /**
   * Violation message when a part is incompatible with a frequency.
   *
   * @var string
   */
  public $incompatiblePart = '%part is incompatible with %frequency.';

}

Members

Namesort descending Modifiers Type Description Overrides
DateRecurRulePartConstraint::$disallowedFrequency public property Violation message when a frequency is not permitted.
DateRecurRulePartConstraint::$disallowedPart public property Violation message when a part is not permitted.
DateRecurRulePartConstraint::$incompatiblePart public property Violation message when a part is incompatible with a frequency.