Mercurial > hg > cmmr2012-drupal-site
comparison vendor/symfony/validator/Constraints/ExpressionValidator.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
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) |