beforeAction() public method

public beforeAction ( $action )
Example #1
0
 /**
  * If Disqus comments are enabled, disable the entire API
  * @param  CAction $action   The action we are using
  * @return CAction
  */
 public function beforeAction($action)
 {
     if (Cii::getConfig('useDisqusComments') == "1") {
         throw new CHttpException(403, Yii::t('Api.comment', 'The comment API is not available while Disqus comments are enabled.'));
     }
     return parent::beforeAction($action);
 }