summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zfproject.xml8
-rw-r--r--application/controllers/FilterController.php34
-rw-r--r--application/forms/FilterCreate.php13
-rw-r--r--application/models/BootIso.php7
-rw-r--r--application/models/BootMenu.php4
-rw-r--r--application/models/BootMenuEntries.php5
-rw-r--r--application/models/BootOs.php11
-rw-r--r--application/models/Client.php3
-rw-r--r--application/models/Config.php3
-rw-r--r--application/models/Filter.php8
-rw-r--r--application/models/FilterEntries.php4
-rw-r--r--application/models/FilterMapper.php10
-rw-r--r--application/models/Group.php3
-rw-r--r--application/models/GroupGroups.php2
-rw-r--r--application/models/GroupRequest.php4
-rw-r--r--application/models/Membership.php4
-rw-r--r--application/models/MembershipFilters.php2
-rw-r--r--application/models/Person.php13
-rw-r--r--application/models/Pool.php4
-rw-r--r--application/models/PoolEntries.php2
-rw-r--r--application/models/PoolFilters.php2
-rw-r--r--application/models/Right.php3
-rw-r--r--application/models/RightRoles.php2
-rw-r--r--application/models/Role.php4
-rw-r--r--application/models/Session.php6
-rw-r--r--application/views/scripts/filter/index.phtml1
-rw-r--r--application/views/scripts/person/index.phtml22
-rw-r--r--filterTests.sql6
-rw-r--r--tests/application/controllers/FilterControllerTest.php20
29 files changed, 207 insertions, 3 deletions
diff --git a/.zfproject.xml b/.zfproject.xml
index 64456bf..11ef2f3 100644
--- a/.zfproject.xml
+++ b/.zfproject.xml
@@ -23,11 +23,15 @@
<controllerFile controllerName="Person">
<actionMethod actionName="index"/>
</controllerFile>
+ <controllerFile controllerName="Filter">
+ <actionMethod actionName="index"/>
+ </controllerFile>
</controllersDirectory>
<formsDirectory>
<formFile formName="AuthLogin"/>
<formFile formName="Register"/>
<formFile formName="PersonRegister"/>
+ <formFile formName="FilterCreate"/>
</formsDirectory>
<layoutsDirectory enabled="false"/>
<modelsDirectory>
@@ -130,6 +134,9 @@
<viewControllerScriptsDirectory forControllerName="Auth">
<viewScriptFile forActionName="deleteAccount"/>
</viewControllerScriptsDirectory>
+ <viewControllerScriptsDirectory forControllerName="Filter">
+ <viewScriptFile forActionName="index"/>
+ </viewControllerScriptsDirectory>
</viewScriptsDirectory>
<viewHelpersDirectory/>
<viewFiltersDirectory enabled="false"/>
@@ -166,6 +173,7 @@
<testApplicationControllerDirectory>
<testApplicationControllerFile filesystemName="AuthControllerTest.php"/>
<testApplicationControllerFile filesystemName="PersonControllerTest.php"/>
+ <testApplicationControllerFile filesystemName="FilterControllerTest.php"/>
</testApplicationControllerDirectory>
</testApplicationDirectory>
<testLibraryDirectory>
diff --git a/application/controllers/FilterController.php b/application/controllers/FilterController.php
new file mode 100644
index 0000000..6a80ab9
--- /dev/null
+++ b/application/controllers/FilterController.php
@@ -0,0 +1,34 @@
+<?php
+
+class FilterController extends Zend_Controller_Action
+{
+ private $_filtermapper;
+ 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{
+ $data = $this->_filtermapper->fetchAll();
+ print_r(
+ $view = new Zend_View();
+
+ // tell it to use htmlentities as the escaping callback
+ $view->setEscape('htmlentities');
+ #echo $view->render();
+ }catch (Zend_Exception $e) {
+ echo "Error message 2: " . $e->getMessage() . "\n";
+ }
+ }
+
+
+}
+
diff --git a/application/forms/FilterCreate.php b/application/forms/FilterCreate.php
new file mode 100644
index 0000000..e239b94
--- /dev/null
+++ b/application/forms/FilterCreate.php
@@ -0,0 +1,13 @@
+<?php
+
+class Application_Form_FilterCreate extends Zend_Form
+{
+
+ public function init()
+ {
+ /* Form Elements & Other Definitions Here ... */
+ }
+
+
+}
+
diff --git a/application/models/BootIso.php b/application/models/BootIso.php
index ce38fde..706a0a2 100644
--- a/application/models/BootIso.php
+++ b/application/models/BootIso.php
@@ -56,6 +56,7 @@ class Application_Model_BootIso
public function set_membershipID($_membershipID)
{
$this->_membershipID = $_membershipID;
+ return $this;
}
public function get_groupID()
@@ -66,6 +67,7 @@ class Application_Model_BootIso
public function set_groupID($_groupID)
{
$this->_groupID = $_groupID;
+ return $this;
}
public function get_serialnumber()
@@ -76,6 +78,7 @@ class Application_Model_BootIso
public function set_serialnumber($_serialnumber)
{
$this->_serialnumber = $_serialnumber;
+ return $this;
}
public function get_created()
@@ -86,6 +89,7 @@ class Application_Model_BootIso
public function set_created($_created)
{
$this->_created = $_created;
+ return $this;
}
public function get_expires()
@@ -96,6 +100,7 @@ class Application_Model_BootIso
public function set_expires($_expires)
{
$this->_expires = $_expires;
+ return $this;
}
public function get_public()
@@ -106,6 +111,7 @@ class Application_Model_BootIso
public function set_public($_public)
{
$this->_public = $_public;
+ return $this;
}
public function get_bootisoID()
@@ -116,6 +122,7 @@ class Application_Model_BootIso
public function set_bootisoID($_bootisoID)
{
$this->_bootisoID = $_bootisoID;
+ return $this;
}
}
diff --git a/application/models/BootMenu.php b/application/models/BootMenu.php
index 3b1cc41..5a3e8b9 100644
--- a/application/models/BootMenu.php
+++ b/application/models/BootMenu.php
@@ -51,6 +51,7 @@ class Application_Model_BootMenu
public function setID($_bootmenuID)
{
$this->_bootmenuID = $_bootmenuID;
+ return $this;
}
public function getMembershipID()
{
@@ -59,6 +60,7 @@ class Application_Model_BootMenu
public function setMembershipID($_membershipID)
{
$this->_membershipID = $_membershipID;
+ return $this;
}
public function getTitle()
{
@@ -67,6 +69,7 @@ class Application_Model_BootMenu
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getTime()
{
@@ -75,6 +78,7 @@ class Application_Model_BootMenu
public function setTime($_time)
{
$this->_time = $_time;
+ return $this;
}
}
diff --git a/application/models/BootMenuEntries.php b/application/models/BootMenuEntries.php
index 8e86ace..0b88402 100644
--- a/application/models/BootMenuEntries.php
+++ b/application/models/BootMenuEntries.php
@@ -51,6 +51,7 @@ class Application_Model_BootMenuEntries
public function setBootosID($_bootosID)
{
$this->_bootosID = $_bootosID;
+ return $this;
}
public function getBootmenuID()
{
@@ -59,6 +60,7 @@ class Application_Model_BootMenuEntries
public function setBootmenuID($_bootmenuID)
{
$this->_bootmenuID = $_bootmenuID;
+ return $this;
}
public function getTitle()
{
@@ -67,6 +69,7 @@ class Application_Model_BootMenuEntries
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getKcl()
{
@@ -75,6 +78,7 @@ class Application_Model_BootMenuEntries
public function setKcl($_kcl)
{
$this->_kcl = $_kcl;
+ return $this;
}
public function getOrder()
{
@@ -83,6 +87,7 @@ class Application_Model_BootMenuEntries
public function setOrder($_order)
{
$this->_order = $_order;
+ return $this;
}
}
diff --git a/application/models/BootOs.php b/application/models/BootOs.php
index e97684d..57d1423 100644
--- a/application/models/BootOs.php
+++ b/application/models/BootOs.php
@@ -55,6 +55,7 @@ class Application_Model_BootOs
public function setBootosID($_bootosID)
{
$this->_bootosID = $_bootosID;
+ return $this;
}
public function getConfigID()
{
@@ -63,6 +64,7 @@ class Application_Model_BootOs
public function setConfigID($_configID)
{
$this->_configID = $_configID;
+ return $this;
}
public function getGroupID()
{
@@ -71,6 +73,7 @@ class Application_Model_BootOs
public function setGroupID($_groupID)
{
$this->_groupID = $_groupID;
+ return $this;
}
public function getTitle()
{
@@ -79,6 +82,7 @@ class Application_Model_BootOs
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getDescription()
{
@@ -87,6 +91,7 @@ class Application_Model_BootOs
public function setDescription($_description)
{
$this->_description = $_description;
+ return $this;
}
public function getPath_init()
{
@@ -95,6 +100,7 @@ class Application_Model_BootOs
public function setPath_init($_path_init)
{
$this->_path_init = $_path_init;
+ return $this;
}
public function getPath_kernel()
{
@@ -103,6 +109,7 @@ class Application_Model_BootOs
public function setPath_kernel($_path_kernel)
{
$this->_path_kernel = $_path_kernel;
+ return $this;
}
public function getDefaultkcl()
{
@@ -111,6 +118,7 @@ class Application_Model_BootOs
public function setDefaultkcl($_defaultkcl)
{
$this->_defaultkcl = $_defaultkcl;
+ return $this;
}
public function getCreated()
{
@@ -119,6 +127,7 @@ class Application_Model_BootOs
public function setCreated($_created)
{
$this->_created = $_created;
+ return $this;
}
public function getExpires()
{
@@ -127,6 +136,7 @@ class Application_Model_BootOs
public function setExpires($_expires)
{
$this->_expires = $_expires;
+ return $this;
}
public function getPublic()
{
@@ -135,6 +145,7 @@ class Application_Model_BootOs
public function setPublic($_public)
{
$this->_public = $_public;
+ return $this;
}
}
diff --git a/application/models/Client.php b/application/models/Client.php
index 9995bfe..9216b20 100644
--- a/application/models/Client.php
+++ b/application/models/Client.php
@@ -51,6 +51,7 @@ class Application_Model_Client
public function setID($_clientID)
{
$this->_clientID = $_clientID;
+ return $this;
}
public function getMacadress()
{
@@ -59,6 +60,7 @@ class Application_Model_Client
public function setMacadress($_macadress)
{
$this->_macadress = $_macadress;
+ return $this;
}
public function getHardwarehash()
{
@@ -67,6 +69,7 @@ class Application_Model_Client
public function setHardwarehash($_hardwarehash)
{
$this->_hardwarehash = $_hardwarehash;
+ return $this;
}
}
diff --git a/application/models/Config.php b/application/models/Config.php
index a553c65..94ff256 100644
--- a/application/models/Config.php
+++ b/application/models/Config.php
@@ -51,6 +51,7 @@ class Application_Model_Config
public function setID($_configID)
{
$this->_configID = $_configID;
+ return $this;
}
public function getMembershipID()
{
@@ -59,6 +60,7 @@ class Application_Model_Config
public function setMembershipID($_membershipID)
{
$this->_membershipID = $_membershipID;
+ return $this;
}
public function getShellscript()
{
@@ -67,6 +69,7 @@ class Application_Model_Config
public function setShellscript($_shellscript)
{
$this->_shellscript = $_shellscript;
+ return $this;
}
}
diff --git a/application/models/Filter.php b/application/models/Filter.php
index 0c8588c..f90c985 100644
--- a/application/models/Filter.php
+++ b/application/models/Filter.php
@@ -56,6 +56,7 @@ class Application_Model_Filter
public function setID($_filterID)
{
$this->_filterID = $_filterID;
+ return $this;
}
public function getMembershipID()
{
@@ -64,6 +65,7 @@ class Application_Model_Filter
public function setMembershipID($_membershipID)
{
$this->_membershipID = $_membershipID;
+ return $this;
}
public function getGroupID()
{
@@ -72,6 +74,7 @@ class Application_Model_Filter
public function setGroupID($_groupID)
{
$this->_groupID = $_groupID;
+ return $this;
}
public function getBootmenuID()
{
@@ -80,6 +83,7 @@ class Application_Model_Filter
public function setBootmenuID($_bootmenuID)
{
$this->_bootmenuID = $_bootmenuID;
+ return $this;
}
public function getTitle()
{
@@ -88,6 +92,7 @@ class Application_Model_Filter
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getDescription()
{
@@ -96,6 +101,7 @@ class Application_Model_Filter
public function setDescription($_description)
{
$this->_description = $_description;
+ return $this;
}
public function getCreated()
{
@@ -104,6 +110,7 @@ class Application_Model_Filter
public function setCreated($_created)
{
$this->_created = $_created;
+ return $this;
}
public function getPriority()
{
@@ -112,6 +119,7 @@ class Application_Model_Filter
public function setPriority($_priority)
{
$this->_priority = $_priority;
+ return $this;
}
}
diff --git a/application/models/FilterEntries.php b/application/models/FilterEntries.php
index 724560b..63aa864 100644
--- a/application/models/FilterEntries.php
+++ b/application/models/FilterEntries.php
@@ -52,6 +52,7 @@ class Application_Model_FilterEntries
public function setFilterID($_filterID)
{
$this->_filterID = $_filterID;
+ return $this;
}
public function getFiltertypeID()
{
@@ -60,6 +61,7 @@ class Application_Model_FilterEntries
public function setFiltertypeID($_filtertypeID)
{
$this->_filtertypeID = $_filtertypeID;
+ return $this;
}
public function getFiltervalue()
{
@@ -68,6 +70,7 @@ class Application_Model_FilterEntries
public function setFiltervalue($_filtervalue)
{
$this->_filtervalue = $_filtervalue;
+ return $this;
}
public function getFiltervalue2()
{
@@ -76,6 +79,7 @@ class Application_Model_FilterEntries
public function setFiltervalue2($_filtervalue2)
{
$this->_filtervalue2 = $_filtervalue2;
+ return $this;
}
}
diff --git a/application/models/FilterMapper.php b/application/models/FilterMapper.php
index 805c916..db1db69 100644
--- a/application/models/FilterMapper.php
+++ b/application/models/FilterMapper.php
@@ -23,7 +23,7 @@ class Application_Model_FilterMapper
public function getDbTable()
{
if (null === $this->_dbTable) {
- $this->setDbTable('Application_Model_DbTable_Person');
+ $this->setDbTable('Application_Model_DbTable_Filter');
}
return $this->_dbTable;
@@ -61,7 +61,13 @@ class Application_Model_FilterMapper
foreach ($resultSet as $row) {
$entry = new Application_Model_Filter();
- $entry->setID($row->filterID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setDescription($row->description)->setCreated($row->created)->setPriority($row->priority);
+ $entry->setID($row->filterID)->setMembershipID($row->membershipID)
+ ->setGroupID($row->groupID)
+ ->setBootmenuID($row->bootmenuID)
+ ->setTitle($row->title)
+ ->setDescription($row->description)
+ ->setCreated($row->created)
+ ->setPriority($row->priority);
$entries[] = $entry;
}
diff --git a/application/models/Group.php b/application/models/Group.php
index 8824098..2ef4f6a 100644
--- a/application/models/Group.php
+++ b/application/models/Group.php
@@ -51,6 +51,7 @@ class Application_Model_Group
public function setID($_groupID)
{
$this->_groupID = $_groupID;
+ return $this;
}
public function getTitle()
{
@@ -59,6 +60,7 @@ class Application_Model_Group
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getDescription()
{
@@ -67,6 +69,7 @@ class Application_Model_Group
public function setDescription($_description)
{
$this->_description = $_description;
+ return $this;
}
}
diff --git a/application/models/GroupGroups.php b/application/models/GroupGroups.php
index af5c43c..3673d57 100644
--- a/application/models/GroupGroups.php
+++ b/application/models/GroupGroups.php
@@ -50,6 +50,7 @@ class Application_Model_GroupGroups
public function setParentID($_parentID)
{
$this->_parentID = $_parentID;
+ return $this;
}
public function getGroupID()
{
@@ -58,6 +59,7 @@ class Application_Model_GroupGroups
public function setGroupID($_groupID)
{
$this->_groupID = $_groupID;
+ return $this;
}
}
diff --git a/application/models/GroupRequest.php b/application/models/GroupRequest.php
index 166bf95..8c24c49 100644
--- a/application/models/GroupRequest.php
+++ b/application/models/GroupRequest.php
@@ -52,6 +52,7 @@ class Application_Model_GroupRequest
public function setID($_grouprequestID)
{
$this->_grouprequestID = $_grouprequestID;
+ return $this;
}
public function getGroupID()
{
@@ -60,6 +61,7 @@ class Application_Model_GroupRequest
public function setGroupID($_groupID)
{
$this->_groupID = $_groupID;
+ return $this;
}
public function getPersonID()
{
@@ -68,6 +70,7 @@ class Application_Model_GroupRequest
public function setPersonID($_personID)
{
$this->_personID = $_personID;
+ return $this;
}
public function getTime()
{
@@ -76,6 +79,7 @@ class Application_Model_GroupRequest
public function setTime($_time)
{
$this->_time = $_time;
+ return $this;
}
}
diff --git a/application/models/Membership.php b/application/models/Membership.php
index 6c8bde2..4107072 100644
--- a/application/models/Membership.php
+++ b/application/models/Membership.php
@@ -52,6 +52,7 @@ class Application_Model_Membership
public function setID($_membershipID)
{
$this->_membershipID = $_membershipID;
+ return $this;
}
public function getGroupID()
{
@@ -60,6 +61,7 @@ class Application_Model_Membership
public function setGroupID($_groupID)
{
$this->_groupID = $_groupID;
+ return $this;
}
public function getRoleID()
{
@@ -68,6 +70,7 @@ class Application_Model_Membership
public function setRoleID($_roleID)
{
$this->_roleID = $_roleID;
+ return $this;
}
public function getPersonID()
{
@@ -76,6 +79,7 @@ class Application_Model_Membership
public function setPersonID($_personID)
{
$this->_personID = $_personID;
+ return $this;
}
}
diff --git a/application/models/MembershipFilters.php b/application/models/MembershipFilters.php
index fb6be19..37add69 100644
--- a/application/models/MembershipFilters.php
+++ b/application/models/MembershipFilters.php
@@ -50,6 +50,7 @@ class Application_Model_MembershipFilters
public function setMembershipID($_membershipID)
{
$this->_membershipID = $_membershipID;
+ return $this;
}
public function getFilterID()
{
@@ -58,6 +59,7 @@ class Application_Model_MembershipFilters
public function setFilterID($_filterID)
{
$this->_filterID = $_filterID;
+ return $this;
}
}
diff --git a/application/models/Person.php b/application/models/Person.php
index c8a6717..8eb96bb 100644
--- a/application/models/Person.php
+++ b/application/models/Person.php
@@ -61,6 +61,7 @@ class Application_Model_Person
public function setID($_personID)
{
$this->_personID = $_personID;
+ return $this;
}
public function getTitle()
{
@@ -69,6 +70,7 @@ class Application_Model_Person
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getName()
{
@@ -77,6 +79,7 @@ class Application_Model_Person
public function setName($_name)
{
$this->_name = $_name;
+ return $this;
}
public function getFirstname()
{
@@ -85,6 +88,7 @@ class Application_Model_Person
public function setFirstname($_firstname)
{
$this->_firstname = $_firstname;
+ return $this;
}
public function getStreet()
{
@@ -93,6 +97,7 @@ class Application_Model_Person
public function setStreet($_street)
{
$this->_street = $_street;
+ return $this;
}
public function getHousenumber()
{
@@ -101,6 +106,7 @@ class Application_Model_Person
public function setHousenumber($_housenumber)
{
$this->_housenumber = $_housenumber;
+ return $this;
}
public function getCity()
{
@@ -109,6 +115,7 @@ class Application_Model_Person
public function setCity($_city)
{
$this->_city = $_city;
+ return $this;
}
public function getPostalcode()
{
@@ -117,6 +124,7 @@ class Application_Model_Person
public function setPostalcode($_postalcode)
{
$this->_postalcode = $_postalcode;
+ return $this;
}
public function getLogindate()
{
@@ -125,6 +133,7 @@ class Application_Model_Person
public function setLogindate($_logindate)
{
$this->_logindate = $_logindate;
+ return $this;
}
public function getRegisterdate()
{
@@ -133,6 +142,7 @@ class Application_Model_Person
public function setRegisterdate($_registerdate)
{
$this->_registerdate = $_registerdate;
+ return $this;
}
public function getEmail()
{
@@ -141,6 +151,7 @@ class Application_Model_Person
public function setEmail($_email)
{
$this->_email = $_email;
+ return $this;
}
public function getLogin()
{
@@ -149,6 +160,7 @@ class Application_Model_Person
public function setLogin($_login)
{
$this->_login = $_login;
+ return $this;
}
public function getPassword()
{
@@ -157,6 +169,7 @@ class Application_Model_Person
public function setPassword($_password)
{
$this->_password = $_password;
+ return $this;
}
}
diff --git a/application/models/Pool.php b/application/models/Pool.php
index 53e13e2..76c7a3b 100644
--- a/application/models/Pool.php
+++ b/application/models/Pool.php
@@ -52,6 +52,7 @@ class Application_Model_Pool
public function setID($_poolID)
{
$this->_poolID = $_poolID;
+ return $this;
}
public function getTitle()
{
@@ -60,6 +61,7 @@ class Application_Model_Pool
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getDescription()
{
@@ -68,6 +70,7 @@ class Application_Model_Pool
public function setDescription($_description)
{
$this->_description = $_description;
+ return $this;
}
public function getLocation()
{
@@ -76,6 +79,7 @@ class Application_Model_Pool
public function setLocation($_location)
{
$this->_location = $_location;
+ return $this;
}
}
diff --git a/application/models/PoolEntries.php b/application/models/PoolEntries.php
index d20c226..2a74dad 100644
--- a/application/models/PoolEntries.php
+++ b/application/models/PoolEntries.php
@@ -50,6 +50,7 @@ class Application_Model_PoolEntries
public function setPoolID($_poolID)
{
$this->_poolID = $_poolID;
+ return $this;
}
public function getClientID()
{
@@ -58,6 +59,7 @@ class Application_Model_PoolEntries
public function setClientID($_clientID)
{
$this->_clientID = $_clientID;
+ return $this;
}
}
diff --git a/application/models/PoolFilters.php b/application/models/PoolFilters.php
index 6daf465..5511c4b 100644
--- a/application/models/PoolFilters.php
+++ b/application/models/PoolFilters.php
@@ -50,6 +50,7 @@ class Application_Model_PoolFilters
public function setPoolID($_poolID)
{
$this->_poolID = $_poolID;
+ return $this;
}
public function getFilterID()
{
@@ -58,6 +59,7 @@ class Application_Model_PoolFilters
public function setFilterID($_filterID)
{
$this->_filterID = $_filterID;
+ return $this;
}
}
diff --git a/application/models/Right.php b/application/models/Right.php
index ebb3430..ad1821e 100644
--- a/application/models/Right.php
+++ b/application/models/Right.php
@@ -51,6 +51,7 @@ class Application_Model_Right
public function setID($_rightID)
{
$this->_rightID = $_rightID;
+ return $this;
}
public function getTitle()
{
@@ -59,6 +60,7 @@ class Application_Model_Right
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getDescription()
{
@@ -67,6 +69,7 @@ class Application_Model_Right
public function setDescription($_description)
{
$this->_description = $_description;
+ return $this;
}
}
diff --git a/application/models/RightRoles.php b/application/models/RightRoles.php
index d5bdd65..e9b75c7 100644
--- a/application/models/RightRoles.php
+++ b/application/models/RightRoles.php
@@ -50,6 +50,7 @@ class Application_Model_RightRoles
public function setRoleID($_roleID)
{
$this->_roleID = $_roleID;
+ return $this;
}
public function getRightID()
{
@@ -58,6 +59,7 @@ class Application_Model_RightRoles
public function setRightID($_rightID)
{
$this->_rightID = $_rightID;
+ return $this;
}
}
diff --git a/application/models/Role.php b/application/models/Role.php
index d00b93f..0503627 100644
--- a/application/models/Role.php
+++ b/application/models/Role.php
@@ -52,6 +52,7 @@ class Application_Model_Role
public function setID($_roleID)
{
$this->_roleID = $_roleID;
+ return $this;
}
public function getGroupID()
{
@@ -60,6 +61,7 @@ class Application_Model_Role
public function setGroupID($_groupID)
{
$this->_groupID = $_groupID;
+ return $this;
}
public function getTitle()
{
@@ -68,6 +70,7 @@ class Application_Model_Role
public function setTitle($_title)
{
$this->_title = $_title;
+ return $this;
}
public function getDescription()
{
@@ -76,6 +79,7 @@ class Application_Model_Role
public function setDescription($_description)
{
$this->_description = $_description;
+ return $this;
}
}
diff --git a/application/models/Session.php b/application/models/Session.php
index 2820afe..73b6b4d 100644
--- a/application/models/Session.php
+++ b/application/models/Session.php
@@ -54,6 +54,7 @@ class Application_Model_Session
public function setID($_sessionID)
{
$this->_sessionID = $_sessionID;
+ return $this;
}
public function getClientID()
{
@@ -62,6 +63,7 @@ class Application_Model_Session
public function setClientID($_clientID)
{
$this->_clientID = $_clientID;
+ return $this;
}
public function getBootosID()
{
@@ -70,6 +72,7 @@ class Application_Model_Session
public function setBootosID($_bootosID)
{
$this->_bootosID = $_bootosID;
+ return $this;
}
public function getTime()
{
@@ -78,6 +81,7 @@ class Application_Model_Session
public function setTime($_time)
{
$this->_time = $_time;
+ return $this;
}
public function getIp()
{
@@ -86,6 +90,7 @@ class Application_Model_Session
public function setIp($_ip)
{
$this->_ip = $_ip;
+ return $this;
}
public function getIp6()
{
@@ -94,6 +99,7 @@ class Application_Model_Session
public function setIp6($_ip6)
{
$this->_ip6 = $_ip6;
+ return $this;
}
}
diff --git a/application/views/scripts/filter/index.phtml b/application/views/scripts/filter/index.phtml
new file mode 100644
index 0000000..bace90f
--- /dev/null
+++ b/application/views/scripts/filter/index.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Filter</b> and script/action name <b>index</b></center> \ No newline at end of file
diff --git a/application/views/scripts/person/index.phtml b/application/views/scripts/person/index.phtml
index 7a96e97..710e08f 100644
--- a/application/views/scripts/person/index.phtml
+++ b/application/views/scripts/person/index.phtml
@@ -1 +1,21 @@
-<br /><br /><center>View script for controller <b>Person</b> and script/action name <b>index</b></center> \ No newline at end of file
+<?php if ($this->filters): ?>
+
+ <!-- A table of filters. -->
+ <table>
+ <tr>
+ <th>filterid</th>
+ </tr>
+
+ <?php foreach ($this->filters as $key => $val): ?>
+ <tr>
+ <td><?php echo $this->escape($val['title']) ?></td>
+ </tr>
+ <?php endforeach; ?>
+
+ </table>
+
+<?php else: ?>
+
+ <p>There are no filters to display.</p>
+
+<?php endif;?>
diff --git a/filterTests.sql b/filterTests.sql
new file mode 100644
index 0000000..95d15ab
--- /dev/null
+++ b/filterTests.sql
@@ -0,0 +1,6 @@
+INSERT INTO `pbs`.`pbs_group` (`groupID` ,`title` ,`description`)VALUES (NULL , 'testgruppe1', NULL);
+INSERT INTO `pbs`.`pbs_person` (`personID`, `title`, `name`, `firstname`, `street`, `housenumber`, `city`, `postalcode`, `logindate`, `registerdate`, `email`, `login`, `password`, `password_salt`) VALUES (NULL, 'Mr.Test', 'te', 'st', NULL, NULL, NULL, NULL, NULL, '', '', 'test', '', '');
+INSERT INTO `pbs`.`pbs_role` (`roleID`, `groupID`, `title`, `description`) VALUES (NULL, '1', 'Testrolle', NULL);
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`) VALUES (NULL, '1', '1', '1');
+INSERT INTO `pbs`.`pbs_bootmenu` (`bootmenuID`, `membershipID`, `title`, `time`) VALUES (NULL, '1', 'TestBootMenu', '');
+INSERT INTO `pbs`.`pbs_filter` (`filterID`, `membershipID`, `groupID`, `bootmenuID`, `title`, `description`, `created`, `priority`) VALUES (NULL, '1', '1', '1', 'TestFilter', NULL, '', '1');
diff --git a/tests/application/controllers/FilterControllerTest.php b/tests/application/controllers/FilterControllerTest.php
new file mode 100644
index 0000000..ac50215
--- /dev/null
+++ b/tests/application/controllers/FilterControllerTest.php
@@ -0,0 +1,20 @@
+<?php
+
+require_once 'PHPUnit/Framework/TestCase.php';
+
+class FilterControllerTest extends PHPUnit_Framework_TestCase
+{
+
+ public function setUp()
+ {
+ /* Setup Routine */
+ }
+
+ public function tearDown()
+ {
+ /* Tear Down Routine */
+ }
+
+
+}
+