Exemple #1
0
 public function addError(FormError $error)
 {
     if (null === $error->getOrigin()) {
         $error->setOrigin($this);
     }
     if ($this->parent && $this->config->getErrorBubbling()) {
         $this->parent->addError($error);
     } else {
         $this->errors[] = $error;
     }
     return $this;
 }
Exemple #2
0
 function propertyPath(FormError $error)
 {
     $parent = $error->getOrigin();
     $out = '';
     while ($parent) {
         $out = $parent->getPropertyPath() . $out;
         $parent = $parent->getParent();
         if ($parent) {
             $out = '_' . $out;
         }
     }
     return $out;
 }