コード例 #1
0
 /**
  * Add/Delete Bookmark with AJAX.
  */
 public function actionAjaxBookmark()
 {
     $model = $this->loadPost();
     echo Bookmark::addDel($model->id) ? Yii::t('lan', 'Delete') : Yii::t('lan', 'Add');
 }
コード例 #2
0
 /**
  * Add/Delete Bookmark with AJAX.
  */
 public function actionAjaxBookmark()
 {
     $post = $this->loadPost();
     $post->refresh();
     echo Bookmark::addDel($post->id) ? Yii::t('lan', 'Delete') : Yii::t('lan', 'Add');
 }