public function preDispatch()
 {
     $model = Kwf_Model_Abstract::getInstance('Kwf_Form_MultiCheckbox_DataModel');
     $model->setData(array(array('id' => 1)));
     $this->_model = $model;
     parent::preDispatch();
 }
 public function preDispatch()
 {
     parent::preDispatch();
     $gen = Kwf_Component_Generator_Abstract::getInstance($this->_getParam('class'), 'detail');
     $this->_form->setId($this->_getParam('componentId') . $gen->getIdSeparator() . $this->_getParam('id'));
     $this->_form->setCreateMissingRow(true);
 }
 public function preDispatch()
 {
     if (!isset($this->_form)) {
         if (isset($this->_formName)) {
             $this->_form = new $this->_formName('form', $this->_getParam('class'), $this->_getParam('newsletterComponentId'));
         }
     }
     parent::preDispatch();
 }
 public function preDispatch()
 {
     $regUserForm = Kwf_Registry::get('config')->user->form;
     if (is_string($regUserForm)) {
         $this->_formName = $regUserForm;
     } else {
         $this->_formName = $regUserForm->grid;
     }
     parent::preDispatch();
 }
 public function preDispatch()
 {
     $regUserForm = Kwf_Registry::get('config')->user->form;
     if (is_string($regUserForm)) {
         $this->_formName = $regUserForm;
     } else {
         $this->_formName = $regUserForm->self;
     }
     parent::preDispatch();
     $authedUser = Kwf_Registry::get('userModel')->getAuthedUser();
     $row = $this->_form->getModel()->getRowByKwfUser($authedUser);
     $this->_form->setId($row->id);
 }
Example #6
0
 public function preDispatch()
 {
     $t = microtime(true);
     if (!isset($this->_form)) {
         if (isset($this->_formName)) {
             $this->_form = new $this->_formName(null, $this->_getParam('class'));
         } else {
             $this->_form = Kwc_Abstract_Form::createComponentForm($this->_getParam('class'), 'component');
         }
     }
     Kwf_Benchmark::subCheckpoint('create component form', microtime(true) - $t);
     $this->_form->setBodyStyle('padding: 10px');
     $this->_form->setId($this->_getParam('componentId'));
     parent::preDispatch();
 }
 public function preDispatch()
 {
     $this->_model = new Kwf_Model_FnF(array('primaryKey' => 'id', 'fields' => array('id', 'clear_cache_affected', 'clear_cache_comment'), 'data' => array(array('id' => 1, 'clear_cache_affected' => '', 'clear_cache_comment' => ''))));
     parent::preDispatch();
 }
 public function preDispatch()
 {
     $categoryToItemModel = Kwf_Model_Abstract::getInstance(Kwc_Abstract::getSetting($this->_getParam('class'), 'categoryToItemModelName'));
     $this->_model = $categoryToItemModel->getReferencedModel('Category');
     parent::preDispatch();
 }
 public function preDispatch()
 {
     $this->_model = Kwf_Model_Abstract::getInstance('Kwf_Form_MultiFields_TestModel1');
     parent::preDispatch();
 }