Esempio n. 1
0
 /**
  * Returns the current sub-form in a sequence and advances the internal pointer.
  *
  * @return Opf_Form
  */
 public function getNextSubform()
 {
     $this->_current = current($this->_items[$this->_placeholder]);
     next($this->_items[$this->_placeholder]);
     if (is_object($this->_current)) {
         $this->_current->setView($this->_view);
         $this->_current->invokeEvent('preInit');
         $this->_current->onInit();
         $this->_current->invokeEvent('postInit');
     }
     return $this->_current;
 }
Esempio n. 2
0
 public function onInit()
 {
     $this->appendItem($item = new Opf_Repeater(new SingleForm('subform'), 10));
     $item->setMinRequired(3);
     parent::onInit();
 }