public function actionManage() { $model = new SiteAction('search'); $model->unsetAttributes(); if (isset($_GET['SiteAction'])) { p($_GET['SiteAction']); $model->attributes = $_GET['SiteAction']; } $this->render('manage', array('model' => $model)); }
private function setTitleAndSaveSiteAction($action) { $action_titles = call_user_func(array(get_class($action->controller), 'actionsTitles')); if (!isset($action_titles[ucfirst($action->id)])) { throw new CHttpException('Не найден заголовок для дейсвия ' . ucfirst($action->id)); } $title = $action_titles[ucfirst($action->id)]; $this->page_title = $title; $site_action = new SiteAction(); $site_action->title = $title; $site_action->module = $action->controller->module->id; $site_action->controller = $action->controller->id; $site_action->action = $action->id; if (!Yii::app()->user->isGuest) { $site_action->user_id = Yii::app()->user->id; } $object_id = $this->request->getParam('id'); if ($object_id) { $site_action->object_id = $object_id; } $site_action->save(); }