Exemple #1
0
 public function executeMenuitem()
 {
     $this->module = $this->getModuleName();
     $initial = $this->getRequestParameter('initial');
     $department_id = $this->get_department_id();
     $departmentAvailable = $this->tools->departmentAvailable($department_id);
     $this->criteria->add(WebMenuTypePeer::INITIAL, $initial, Criteria::EQUAL);
     $this->menuType = WebMenuTypePeer::doSelectOne($this->criteria);
     if (!$this->menuType) {
         echo 'Menu ' . $initial . ' not found';
     }
     $this->criteria->add(WebMenuTypePeer::DEPARTMENT_ID, $departmentAvailable, Criteria::IN);
     $this->menuType = WebMenuTypePeer::doSelectOne($this->criteria);
     if (!$this->menuType) {
         echo 'Maaf, anda tidak memiliki hak untuk mengakses halaman ini.';
     }
     $this->section = $this->get_section();
 }