コード例 #1
0
 public function getcandidatesreportdataAction()
 {
     $this->_helper->layout->disableLayout();
     $param_arr = $this->_getAllParams();
     $cols_param_arr = $this->_getParam('cols_arr', array());
     if (isset($param_arr['cols_arr'])) {
         unset($param_arr['cols_arr']);
     }
     $page_no = isset($param_arr['page_no']) ? $param_arr['page_no'] : 1;
     $per_page = isset($param_arr['per_page']) ? $param_arr['per_page'] : PERPAGE;
     $sort_name = $param_arr['sort_name'];
     $sort_type = $param_arr['sort_type'];
     if (isset($param_arr['page_no'])) {
         unset($param_arr['page_no']);
     }
     if (isset($param_arr['sort_name'])) {
         unset($param_arr['sort_name']);
     }
     if (isset($param_arr['sort_type'])) {
         unset($param_arr['sort_type']);
     }
     if (isset($param_arr['per_page'])) {
         unset($param_arr['per_page']);
     }
     unset($param_arr['total_grid_columns']);
     unset($param_arr['module']);
     unset($param_arr['controller']);
     unset($param_arr['action']);
     unset($param_arr['format']);
     $candidatedetails_model = new Default_Model_Candidatedetails();
     $candidates_data = $candidatedetails_model->getReportData($param_arr, $per_page, $page_no, $sort_name, $sort_type);
     $page_cnt = $candidates_data['page_cnt'];
     $candidates_data = $candidates_data['rows'];
     $columns_array = array('requisition_code' => 'Requisition Code', 'jobtitle_name' => 'Job Title', 'candidate_name' => 'Candidate', 'emailid' => 'Email', 'cand_status' => 'Status', 'contact_number' => 'Mobile', 'skillset' => 'Skill Set');
     $mandatory_array = array('requisition_code' => 'Requisition Code', 'jobtitle_name' => 'Job Title', 'candidate_name' => 'Candidate', 'emailid' => 'Email', 'cand_status' => 'Status', 'contact_number' => 'Mobile', 'skillset' => 'Skill Set');
     if (count($cols_param_arr) == 0) {
         $cols_param_arr = $mandatory_array;
     }
     $mandatory_array = array_keys($mandatory_array);
     $this->view->requisition_arr = $candidates_data;
     $this->view->columns_array = $columns_array;
     $this->view->mandatory_array = $mandatory_array;
     $this->view->page_cnt = $page_cnt;
     $this->view->per_page = $per_page;
     $this->view->page_no = $page_no;
     $this->view->cols_param_arr = $cols_param_arr;
     $this->view->sort_name = $sort_name;
     $this->view->sort_type = $sort_type;
 }