{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/7647","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/7647/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/7647/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/7647/events","html_url":"https://github.com/yiisoft/yii2/issues/7647","id":60421137,"number":7647,"title":"Module::_viewPath and Module::_layoutPath as protected instead of private.","user":{"login":"vova07","id":2714082,"avatar_url":"https://avatars.githubusercontent.com/u/2714082?v=3","gravatar_id":"","url":"https://api.github.com/users/vova07","html_url":"https://github.com/vova07","followers_url":"https://api.github.com/users/vova07/followers","following_url":"https://api.github.com/users/vova07/following{/other_user}","gists_url":"https://api.github.com/users/vova07/gists{/gist_id}","starred_url":"https://api.github.com/users/vova07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vova07/subscriptions","organizations_url":"https://api.github.com/users/vova07/orgs","repos_url":"https://api.github.com/users/vova07/repos","events_url":"https://api.github.com/users/vova07/events{/privacy}","received_events_url":"https://api.github.com/users/vova07/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2015-03-09T22:26:43Z","updated_at":"2015-03-10T15:50:43Z","closed_at":null,"body":"So here is the case:\r\nMy module class contain this code:\r\n```php\r\n/**\r\n     * @inheritdoc\r\n     */\r\n    public function init()\r\n    {\r\n        parent::init();\r\n\r\n        if ($this->getIsBackend() === true) {\r\n            $this->setViewPath('@vova07/module/views/backend');\r\n        } else {\r\n            $this->setViewPath('@vova07/module/views/frontend');\r\n        }\r\n    }\r\n```\r\nBut in this case I can't use `viewPath` in my app config file.\r\n\r\nI can't rewrite [`getViewPath`](https://github.com/yiisoft/yii2/blob/master/framework/base/Module.php#L244) method in module class because there is used `private` variable.\r\n\r\nIt's an easy change but it's really helpful."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/78082674","html_url":"https://github.com/yiisoft/yii2/issues/7647#issuecomment-78082674","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/7647","id":78082674,"user":{"login":"vova07","id":2714082,"avatar_url":"https://avatars.githubusercontent.com/u/2714082?v=3","gravatar_id":"","url":"https://api.github.com/users/vova07","html_url":"https://github.com/vova07","followers_url":"https://api.github.com/users/vova07/followers","following_url":"https://api.github.com/users/vova07/following{/other_user}","gists_url":"https://api.github.com/users/vova07/gists{/gist_id}","starred_url":"https://api.github.com/users/vova07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vova07/subscriptions","organizations_url":"https://api.github.com/users/vova07/orgs","repos_url":"https://api.github.com/users/vova07/repos","events_url":"https://api.github.com/users/vova07/events{/privacy}","received_events_url":"https://api.github.com/users/vova07/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T15:50:43Z","updated_at":"2015-03-10T15:50:43Z","body":"I'll do a PR soon. Thanks!"}}