protected function getHtmlResponse($action, $result, $params)
    {
        if (Yii::$app->response->format !== Response::FORMAT_HTML) {
            return false;
        }
        $headers = Yii::$app->response->getHeaders();
        if (($location = $headers->get('Location')) !== null) {
            return $this->redirect($location);
        }
        $content = Yii::$app->request->isAjax
            ? $this->renderAjax($action->viewName, $params)
            : $this->render($action->viewName, $params);
        return parent::afterAction($action, $content);
    }
protected function getHtmlResponse($action, $result, $params)
    {
        if (Yii::$app->response->format !== Response::FORMAT_HTML) {
            return false;
        }
        $headers = Yii::$app->response->getHeaders();
        if (($location = $headers->get('Location')) !== null) {
            return $this->redirect($location);
        }
        $content = Yii::$app->request->isAjax
            ? $this->renderAjax($action->viewName, $params)
            : $this->render($action->viewName, $params);
        return parent::afterAction($action, $content);
    }
protected function getHtmlResponse ( $ action , $ result , $ params ) { if ( Yii :: $ app -> response -> format !== Response :: FORMAT_HTML ) { return false ; } $ headers = Yii :: $ app -> response -> getHeaders ( ) ; if ( ( $ location = $ headers -> get ( 'Location' ) ) !== null ) { return $ this -> redirect ( $ location ) ; } $ content = Yii :: $ app -> request -> isAjax ? $ this -> renderAjax ( $ action -> viewName , $ params ) : $ this -> render ( $ action -> viewName , $ params ) ; return parent :: afterAction ( $ action , $ content ) ; }
Returns a rendered view if response format is HTML, boolean false otherwise.
Name of the view is the same as the action id.
@param Action $action the action just executed.
@param mixed $result  the action return result.
@param array $params
@return string rendered view or boolean false if response format is not HTML.
Returns a rendered view if response format is HTML boolean false otherwise . Name of the view is the same as the action id .