public function indexAction() { $projectId =$this->_getProjectId(); $plogs = new Pment_Models_PlogMapper(); $errorMsg = null; $condition[0] = $projectId; $condition[1] = null; if($this->getRequest()->isPost()) { $arrayPlogs = array(); $formData = $this->getRequest()->getPost(); $key = trim($formData['key']); if($key!=null) { $condition[1] = $formData['condition']; $arrayPlogs = $plogs->fetchAllJoin($key,$condition); if(count($arrayPlogs) == 0) { $errorMsg = General_Models_Text::$text_searchErrorNr; } } else { $errorMsg = General_Models_Text::$text_searchErrorNi; } } else { $arrayPlogs = $plogs->fetchAllJoin(null,$condition); } if(count($arrayPlogs) != 0) { $pageNumber = $this->_getParam('page'); $arrayPlogs->setCurrentPageNumber($pageNumber); $arrayPlogs->setItemCountPerPage('20'); } $this->view->messages = $this->_helper->flashMessenger->getMessages(); $this->view->arrayPlogs = $arrayPlogs; $this->view->errorMsg = $errorMsg; }