Example #1
0
 /**
  * Change status with AJAX.
  */
 public function actionAjaxStatus()
 {
     $model = $this->loadPage();
     $options = Page::getStatusOptions();
     $model->status = count($options) == $model->status + 1 ? 0 : $model->status + 1;
     $model->save();
     echo $model->statusText;
 }