/** * 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)); } }
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); } } }
/** * @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); } }