I can’t access it within a controller. If i do inside a controller $this->test; it throws an error. Of course that is because the controller does not extend the module but the CController.
So how can we access class members from the controller that were defined in the module?
public $settings;
public function actionIndex()
{
$this->settings = $this->getModule()->settings;
$this->render('index');
}
But i will need to do that in each controller for each class member. And that’s not a really good practice. Any other way? Or alternative of how can i inherit the controllers from one main controller?