IdanHen
(Idandush)
1
Hello,
I have a module with controller/views/etc.
this module have a controller action i want to override, because i want it to have only admin access.
how can i extend this module controller ?
Thanks,
Idan
IdanHen
(Idandush)
3
Hi Maggie,
this is override/extend controllers inside the application. i suspect its diffrent.
example :
myapplication/module/login_controller -> this url goes and load actionIndex in my login controller inside my module.
i do not have login controller in my project.
there for how can i extend/override it ? its inside the module.
konapaz
(Konapaz)
4
Hi
why didn’t use a condition inside in the action that check the permissions?
if(Yii::app()->user->checkAccess('isSpecial')) {
//todo spacial
} else {
//todo the default
}
If the override is absolutely required then make another controller that extends the base, but you have to request to another controller
...r=yourmodule/basecontroller/index
...r=yourmodule/admincontroller/index