Is there any way to create own view classes extended from standard yii\web\View? I wrote classes to emphasize that I need different classes for different views, but not one common "custom" view class. So that in view php files $this will represent either the respective "custom" class or standard yii\web\View if no custom class is present.
Do you really want to customize some methods of View?
I don’t think the View object is designed to be customized for each and every page. IMO, what should be customized is not the View itself, but the view scripts, layouts, and/or themes that the View object uses to render the pages.
Thank you for reply. I mainly want to add some functions to avoid big piles of php codes mixed with html and js code. Of course I can do this in controller, but I think that view is a better place for it.