From index.php file, I can call a method (eg. getName()) in DefaultController.php when I use "$this->getName()".
From dialog.php file, I want to call a method (eg. getName()) in DefaultController.php using “$this->getName()” but it cannot work. It seems like the $this is not referenced to the DefaultController of ProjectModule. How can I call a method in DefaultController from dialog.php inside the ProjectModule’s module?
Same result as what I used for "$this->getName(id);".
The dialog doesn’t pop-up but no error message is shown.
If I comment out the "Yii::app()->controller->getName(id);" or "$this->getName(id);", the dialog box can appear. So I believe the error lies in the calling of the method from the defaultcontroller or probably returning the value from defaultcontroller to the dialog view.