yura
(Angry Yura)
1
So, I want my module to add several rules to CUrlManager.
Something like:
class MyModule extends CWebModule{
public function init(){
Yii::app() -> urlManager -> addRules($this -> getModuleRules());
}
...
private function getModuleRules(){
...
}
}
The problem is that the module is created only if it exists in path.
yura
(Angry Yura)
2
In other words: can a module be preloaded and is it right?
samdark
(Alexander Makarov)
3
yura
(Angry Yura)
4
The suggested idea of calling addRules() function from config doesn’t suit me.
It’s a module. It must be installed easily without adding to config lots of stuff.
yura
(Angry Yura)
5
Besides I want those rules to work with routes not acquainted with module name.