Exemplo n.º 1
0
 /**
  * Internal use only. Should be called when a change occurs
  * on the parents and the info related to the parent need to be updated
  */
 public function refreshParent()
 {
     if ($this->parent) {
         $this->setNamespace($this->parent->getName(true, true));
         $this->setInternalNamespace($this->parent->getInternalName(true));
     }
 }
Exemplo n.º 2
0
 public function prepareValidation(DataContext $localValues, FormContext $formContext)
 {
     parent::prepareValidation($localValues, $formContext);
     $value = $localValues->getDirectValue($this->getName());
     if (is_array($value)) {
         foreach ($value as $k => $v) {
             $element = $this->__getElemement($k);
             $element->prepareValidation(new DataContext($value), $formContext);
         }
     }
 }
Exemplo n.º 3
0
 /**
  * @inheritdoc
  */
 public function prepareValidation(DataContext $localValues, FormContext $formContext)
 {
     parent::prepareValidation($localValues, $formContext);
     $name = $this->getName();
     foreach ($this->getElements() as $k => $v) {
         if ($name) {
             $values = $localValues->getDirectValue($name);
         } else {
             $values = $localValues->getDataCopy();
         }
         $v->prepareValidation(new DataContext($values), $formContext);
     }
 }