blob: da8e404cbce9116c95d02e4e584bdbcd34ad1899 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
class FilterController extends Zend_Controller_Action
{
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 */
}
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";
}
}
public function addfilterAction()
{
$db = Zend_Db_Table::getDefaultAdapter();
$addfilterform = new Application_Form_FilterAdd();
$this->view->addfilterform = $addfilterform;
}
}
|