You are here

public function WeatherDisplayConstraintValidator::validate in Weather 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Validation/Constraint/WeatherDisplayConstraintValidator.php \Drupal\weather\Plugin\Validation\Constraint\WeatherDisplayConstraintValidator::validate()

File

src/Plugin/Validation/Constraint/WeatherDisplayConstraintValidator.php, line 46

Class

WeatherDisplayConstraintValidator
Constraint validator for changing path aliases in pending revisions.

Namespace

Drupal\weather\Plugin\Validation\Constraint

Code

public function validate($entity, Constraint $constraint) {
  if ($entity instanceof ContentEntityInterface && $entity
    ->isNew()) {
    $type = $entity->type->value;
    $number = $entity->number->value;
    $sdf = '';
  }
}