public function actionIndex() { $modelForm = new CetakLabelRakForm(); $profil = new Profil('search'); $profil->unsetAttributes(); // clear any default values if (isset($_GET['Profil'])) { $profil->attributes = $_GET['Profil']; } $rak = new RakBarang('search'); $rak->unsetAttributes(); if (isset($_GET['RakBarang'])) { $rak->attributes = $_GET['RakBarang']; } $labelCetak = new LabelRakCetak('search'); $labelCetak->unsetAttributes(); if (isset($_GET['LabelRakCetak'])) { $labelCetak->attributes = $_GET['LabelRakCetak']; /* simpan ke sesi untuk digunakan cetak label */ Yii::app()->user->setState('labelKategoriId', $_GET['LabelRakCetak']['kategoriId']); } $layoutForm = new CetakLabelRakLayoutForm(); if (isset($_GET['CetakLabelRakLayoutForm'])) { $layoutForm->attributes = $_GET['CetakLabelRakLayoutForm']; $this->labelRakPdf($layoutForm); } $this->render('index', array('modelForm' => $modelForm, 'profil' => $profil, 'rak' => $rak, 'labelCetak' => $labelCetak, 'layoutForm' => $layoutForm)); }