public function listAction() { $this->view->headTitle($this->config['title']['template']); $_SESSION['temp'] = $_SERVER['REQUEST_URI']; $componentMapper = new Cloud_Model_Component_CloudComponentMapper(); $components = $componentMapper->fetchAllByOrder(); $component_1 = $components[0]; $component_id = $this->request->getParam('component'); $c = null == $component_id ? $component_1->id : $component_id; $name = $this->request->getParam('name'); if (null == $name) { $templates = $this->templateMapper->getTemplateByComponent($c); } else { $templates = $this->templateMapper->searchTemplate($name, $c); } $this->view->assign(array('c' => $c, 'components' => $components, 'templates' => $templates, 'button1' => $this->privilegeTypeMapper->getButton1ById($this->entry, 14))); }