public function actionAbrir($id) { $abrirAgenda = Agenda::model()->findByPk($id); $this->render('formEditarAgenda', ['agenda' => $abrirAgenda]); }
public function actionViewAgenda($id) { date_default_timezone_set("Asia/Manila"); $activity = new Activity(); $activity->act_desc = 'Viewed Agenda ID: ' . $id; $activity->act_datetime = date('Y-m-d G:i:s'); $activity->act_by = User::model()->findByPK(Yii::app()->user->name)->emp_id; $activity->save(); $model = Agenda::model()->findByPk($id); $communication = new CActiveDataProvider('Communication', array('criteria' => array('condition' => 'date_agenda = :date_agenda', 'params' => array(':date_agenda' => $model->session_date)), 'pagination' => array('pageSize' => 10))); $resoMeeting = new CActiveDataProvider('CommMeetingReso', array('criteria' => array('condition' => 'comm_report = :comm_report', 'params' => array(':comm_report' => $model->session_date)), 'pagination' => array('pageSize' => 10))); $ordMeeting = new CActiveDataProvider('CommMeetingReso', array('criteria' => array('condition' => 'comm_report = :comm_report', 'params' => array(':comm_report' => $model->session_date)), 'pagination' => array('pageSize' => 10))); $this->render('/reportsOthers/viewAgenda', array('communication' => $communication, 'resoMeeting' => $resoMeeting, 'ordMeeting' => $ordMeeting)); }
/** * Draws list box containing agenda(s) */ protected function drawAgendaListBox($listName, $data = null, $multiple = false, $temp = null) { echo "<select class='{$listName}' rows=2"; if ($multiple) { echo " multiple='multiple'"; } if ($temp) { echo " name='{$temp}'"; } echo ">"; if ($data) { foreach ($data as $datum) { $model = Agenda::model()->findByAttributes(array('topik' => $datum)); echo "<option value={$model->id}>{$datum}</option>"; } } echo "</select>"; }
/** * Gets detail of some agendas. */ private function getAgendas($agendaRapats) { foreach ($agendaRapats as $agendaRapat) { $agenda[] = Agenda::model()->findByPk($agendaRapat->id_agenda); } return $agenda; }
/** * Gets detail of a current agenda. */ private function getAgenda($idAgenda) { $agenda = Agenda::model()->findByPk($idAgenda); return $agenda; }
/** * 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 Agenda the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Agenda::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }