This might be a pure PHP matter, or even something silly, but I can’t understand what’s going on:
I have a module Themes with a module Admin inside. AdminModule extends ThemesModule. I have a method ThemesModule.getMyTheme and in a controller inside the admin module I do this:
Yii::app()->controller->module->getMyTheme();
But I get this error:
AdminModule and its behaviors do not have a method or closure named "getMyTheme".
Yii::app()->controller->module should be an instance of AdminModule, right? but AdminModule is a class extended from ThemesModule, which contains the public functin getMyTheme definition. Why inheritance is not working in this case?
Thanks in advance.