Symfony\Component\Validator\ExecutionContext::setPropertyPath PHP Method

setPropertyPath() public method

public setPropertyPath ( $propertyPath )
    public function setPropertyPath($propertyPath)
    {
        $this->propertyPath = $propertyPath;
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function isVoteValid(ExecutionContext $context)
 {
     if (!$this->checkValue($this->value)) {
         $propertyPath = $context->getPropertyPath() . '.value';
         $context->setPropertyPath($propertyPath);
         $context->addViolation('A vote cannot have a 0 value', array(), null);
     }
 }
All Usage Examples Of Symfony\Component\Validator\ExecutionContext::setPropertyPath