I want to extend a controller from the backend / controller into a my existed module. The structure of directory in My Yii2 Application as follows.
``
backend
- controllers
- JobOrderController
- view
- job-order
- controllers
modules
- marketing
- controllers
- JobOrderController [extend from @backend \ controllers \ JobOrderController]
- controllers
- marketing
``
When I access the route: localhost / marketing / job-order, I get an error message:
`` View not Found - yii \ base \ ViewNotFoundException The view file does not exist: ../../advanced/backend/modules/marketing/views/job-order/index.php
``
I don't want to change any view from the marketing module, is it possible?
$viewPathin the module'sJobOrderControllerto@backend/view/job-orders? - Michal Hynčicamarketingmodule, setting it in module's$controllerMapproperty might be better idea, because that way you don't need to add any extra files into the module's structure. - Michal Hynčica