/** * 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 the ID of the model to be loaded */ public function loadModel($id) { $model = DepartementM::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
$modSubdepartement = SubdepartementM::model()->findByPK($subdepartement_id); echo $modSubdepartement->subdepartement_nama; ?> </div> </div> <div class="mws-form-row"> <?php echo 'Departement :'; ?> <div style="float:right;"> <?php $departement_id = $_GET['KKontrakkaryawanR']['departement_id']; $modDepartement = DepartementM::model()->findByPK($departement_id); echo $modDepartement->departement_nama; ?> </div> </div> <div class="mws-form-row"> <?php echo 'No Surat Kontrak : '; ?> <div style="float:right;"> <?php echo $_GET['KKontrakkaryawanR']['nosuratkontrak']; ?>
public static function model($className = __CLASS__) { return parent::model($className); }