diff options
author | Simon | 2011-03-02 16:18:07 +0100 |
---|---|---|
committer | Simon | 2011-03-02 16:18:07 +0100 |
commit | c6fad905aaa3889c943e93abcff5e50d94340277 (patch) | |
tree | 9d75a842e70d5ddce1ce348df9bf58bcb1e7cf53 /application/controllers/FilterController.php | |
parent | filter controller - index action geƤndert (diff) | |
download | pbs2-c6fad905aaa3889c943e93abcff5e50d94340277.tar.gz pbs2-c6fad905aaa3889c943e93abcff5e50d94340277.tar.xz pbs2-c6fad905aaa3889c943e93abcff5e50d94340277.zip |
filter geupdated && mein kleines todo
Diffstat (limited to 'application/controllers/FilterController.php')
-rw-r--r-- | application/controllers/FilterController.php | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/application/controllers/FilterController.php b/application/controllers/FilterController.php index 37aafb4..da8e404 100644 --- a/application/controllers/FilterController.php +++ b/application/controllers/FilterController.php @@ -2,29 +2,41 @@ class FilterController extends Zend_Controller_Action { - private $_filtermapper; + + private $_filtermapper = null; + public function init() { - try{ - $this->_filtermapper = new Application_Model_FilterMapper(); - }catch (Zend_Exception $e) { - echo "Error message 1: " . $e->getMessage() . "\n"; - } - /* Initialize action controller here */ - + try{ + $this->_filtermapper = new Application_Model_FilterMapper(); + }catch (Zend_Exception $e) { + echo "Error message 1: " . $e->getMessage() . "\n"; + } + /* Initialize action controller here */ } public function indexAction() { - try{ - $this->_filtermapper = new Application_Model_FilterMapper(); - $this->view->filters = $this->_filtermapper->fetchAll(); - - }catch (Zend_Exception $e) { - echo "Error message 2: " . $e->getMessage() . "\n"; - } + try{ + $this->_filtermapper = new Application_Model_FilterMapper(); + $this->view->filters = $this->_filtermapper->fetchAll(); + + }catch (Zend_Exception $e) { + echo "Error message 2: " . $e->getMessage() . "\n"; + } + } + + public function addfilterAction() + { + $db = Zend_Db_Table::getDefaultAdapter(); + + $addfilterform = new Application_Form_FilterAdd(); + + $this->view->addfilterform = $addfilterform; } } + + |