/** * */ public function printAction() { $this->_helper->layout()->setLayout('print'); $id = $this->_getParam('id'); $mapperExpense = new Fefop_Model_Mapper_Expense(); $itemsConfig = $mapperExpense->getItemsConfig(); $this->view->identifier = $itemsConfig[$id]; $this->view->rules = $this->_mapper->listRules($id); $this->view->rulesOptions = $this->_mapper->getOptionsRules(); $this->view->user = Zend_Auth::getInstance()->getIdentity(); }
public function init() { $this->setAttrib('class', 'horizontal-form'); $elements = array(); $elements[] = $this->createElement('hidden', 'rule')->setIsArray(true); $elements[] = $this->createElement('hidden', 'value')->setIsArray(true); $elements[] = $this->createElement('hidden', 'message')->setIsArray(true); $elements[] = $this->createElement('hidden', 'required')->setIsArray(true); $elements[] = $this->createElement('hidden', 'time_unit')->setIsArray(true); $mapperExpense = new Fefop_Model_Mapper_Expense(); $itemsConfig = $mapperExpense->getItemsConfig(); $items = array('' => '') + $itemsConfig; $elements[] = $this->createElement('select', 'identifier')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Hili Item ba Konfigurasaun')->addMultiOptions($items)->setRequired(true); $this->addElements($elements); App_Form_Toolbar::build($this, self::ID); $this->setDecorators($this->getDefaultFormDecorators()); }