CommentController::actionApprove PHP Method

actionApprove() public method

If approval is successful, the browser will be redirected to the comment index page.
public actionApprove ( )
    public function actionApprove()
    {
        if (Yii::app()->request->isPostRequest) {
            $comment = $this->loadModel();
            $comment->approve();
            $this->redirect(array('index'));
        } else {
            throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
        }
    }