public function addElement(Element $element) { if ($element instanceof Element) { $this->elements[$element->getName()] = $element; } else { throw new Exception('Element must be specified by string or Life\\Form\\Element instance'); } return $this; }
public function addElement(Element $element, $name = null, $options = null) { if ($element instanceof Element) { if (null === $name) { $name = $element->getName(); } $this->elements[$element->getAttrib('id')] = $element; } else { throw new Exception('Element must be specified by string or Life\\Form\\Element instance'); } $this->order[$name] = $this->elements[$name]->getOrder(); $this->orderUpdated = true; return $this; }
public function loadConfiguration() { parent::loadConfiguration(); $obj = new Configuration(); $config = $obj->loadCampoConfiguration($this->form->getAttrib('name'), $this->getName()); if (null === $config) { return $this; } if ($config->isEmpty()) { return $this; } if ($config->getMultiExternalHTML()) { $this->setMultiExternalHTML($config->getMultiExternalHTML()); } if ($config->getSeparador()) { $this->setSeparator($config->getSeparador()); } return $this; }
/** * Retrieve error messages; proxy to transfer adapter * * @return array */ public function getMessages() { return parent::getMessages() + $this->getTransferAdapter()->getMessages(); }