yii\base\Controller::getViewPath PHP Method

getViewPath() public method

The default implementation returns the directory named as controller [[id]] under the [[module]]'s [[viewPath]] directory.
public getViewPath ( ) : string
return string the directory containing the view files for this controller.
    public function getViewPath()
    {
        if ($this->_viewPath === null) {
            $this->_viewPath = $this->module->getViewPath() . DIRECTORY_SEPARATOR . $this->id;
        }
        return $this->_viewPath;
    }