public function run() { $this->htmlOptions['style'] = 'width: ' . $this->width . 'px; height: ' . $this->height . 'px;'; $this->htmlOptions['class'] = "player"; $player = PlayerPlaylist::model()->findByPK($this->playlist_id); $this->render('index', array('player' => $player)); }
/** * Delete page by Pk */ public function actionDelete() { if (Yii::app()->request->isPostRequest) { $model = PlayerPlaylist::model()->findAllByPk($_REQUEST['id']); if (!empty($model)) { foreach ($model as $page) { $page->delete(); } } if (!Yii::app()->request->isAjaxRequest) { $this->redirect('index'); } } }