Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/validator/Constraints/ExpressionValidator.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
37 { | 37 { |
38 if (!$constraint instanceof Expression) { | 38 if (!$constraint instanceof Expression) { |
39 throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); | 39 throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); |
40 } | 40 } |
41 | 41 |
42 $variables = array(); | 42 $variables = []; |
43 $variables['value'] = $value; | 43 $variables['value'] = $value; |
44 $variables['this'] = $this->context->getObject(); | 44 $variables['this'] = $this->context->getObject(); |
45 | 45 |
46 if (!$this->getExpressionLanguage()->evaluate($constraint->expression, $variables)) { | 46 if (!$this->getExpressionLanguage()->evaluate($constraint->expression, $variables)) { |
47 $this->context->buildViolation($constraint->message) | 47 $this->context->buildViolation($constraint->message) |