Пример #1
0
 /**
  * @inheritdoc
  */
 public function run($id)
 {
     parent::run($id);
     $this->_model->delete();
     \Yii::$app->session->setFlash('success', $this->successMessage);
     return $this->controller->redirect($this->redirectUrl);
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function run($id)
 {
     parent::run($id);
     $viewParam = ['model' => $this->_model];
     return \Yii::$app->request->isAjax ? $this->controller->renderAjax($this->view, $viewParam) : $this->controller->render($this->view, $viewParam);
 }