Beispiel #1
0
 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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 /**
  * Retrieve error messages; proxy to transfer adapter
  *
  * @return array
  */
 public function getMessages()
 {
     return parent::getMessages() + $this->getTransferAdapter()->getMessages();
 }