You are here

WeatherDisplayConstraint.php in Weather 2.0.x

Same filename and directory in other branches
  1. 8 src/Plugin/Validation/Constraint/WeatherDisplayConstraint.php

File

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

namespace Drupal\weather\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Checks that created Weather Display is valid.
 *
 * @Constraint(
 *   id = "WeatherDisplay",
 *   label = @Translation("Weather display unique", context = "Validation"),
 *   type = "string"
 * )
 */
class WeatherDisplayConstraint extends Constraint {

  /**
   * Error message, the default display exists.
   *
   * @var string
   */
  public $notUniqueDefaultDisplay = '%value default display already exists.';

  /**
   * Error message, the user display exists.
   *
   * @var string
   */
  public $notUniqueUserDisplay = '%value display for this user already exists.';

}

Classes

Namesort descending Description
WeatherDisplayConstraint Checks that created Weather Display is valid.