Beispiel #1
0
 public function preDispatch()
 {
     if (!isset($this->_table) && !isset($this->_tableName)) {
         if (Kwc_Abstract::hasSetting($this->_getParam('class'), 'tablename')) {
             $tablename = Kwc_Abstract::getSetting($this->_getParam('class'), 'tablename');
             $this->_table = new $tablename(array('componentClass' => $this->_getParam('class')));
         } else {
             if (Kwc_Abstract::hasSetting($this->_getParam('class'), 'childModel')) {
                 $childModelName = Kwc_Abstract::getSetting($this->_getParam('class'), 'childModel');
                 $this->_model = new $childModelName(array('componentClass' => $this->_getParam('class')));
             } else {
                 throw new Kwf_Exception('No tablename in Setting defined: ' . $class);
             }
         }
     }
     parent::preDispatch();
 }
 public function preDispatch()
 {
     $this->_modelName = Kwc_Abstract::getSetting($this->_getParam('class'), 'projectsModel');
     parent::preDispatch();
 }