Пример #1
0
 /**
  * Gets array providing the meeting categories.
  */
 protected function getMeetingCategories()
 {
     $categoryArray = CHtml::listData(KategoriRapat::model()->findAll(), 'inisial', 'deskripsi');
     return $categoryArray;
 }
Пример #2
0
 /**
  * Gets array providing the meeting categories.
  */
 protected function getMeetingCategories()
 {
     $divisi = $this->isDivisionAdmin();
     if ($divisi) {
         $jenisRapatDivisi = DivisiKategorirapat::model()->findAllByAttributes(array('nama_divisi' => $divisi));
         foreach ($jenisRapatDivisi as $jenisRapat) {
             $jenisRapats[] = $jenisRapat->jenis_rapat;
         }
     }
     //print_r($jenisRapats);
     $categoryArray = CHtml::listData(KategoriRapat::model()->findAllByAttributes(array('inisial' => $jenisRapats)), 'inisial', 'deskripsi');
     //$categoryArray = CHtml::listData(KategoriRapat::model()->findAll(), 'inisial', 'deskripsi');
     return $categoryArray;
 }
Пример #3
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return KategoriRapat the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = KategoriRapat::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }