コード例 #1
0
 /**
  * Returns an error array for a constraint violation
  *
  * @param ConstraintViolationInterface $violation
  *
  * @return array
  */
 protected function getViolationError(ConstraintViolationInterface $violation)
 {
     return array($violation->getMessageTemplate(), $violation->getMessageParameters());
 }
コード例 #2
0
 /**
  * @Serializer\Groups({"all", "debug"})
  * @Serializer\SerializedName("messageParameters")
  * @Serializer\VirtualProperty
  */
 public function getMessageParameters()
 {
     return $this->constraintViolation->getMessageParameters();
 }