Is it possible to instantiate a Controller class within another controller class using the Yii Framework
For example I have controller Student and and method actionShow of class student I have the following
public function actionShow()
{
$student = $this->loadStudent();
$studentContact = new Student_ContactController;
//Checking if there was an ajax request
if(Yii::app()->request->isAjaxRequest){
$this->renderPartial('show',array(
'student'=>$student,
));
}else{
$this->render('show',array(
'student'=>$student,
));
}
}
Is it possible to include this action in the method $studentContact = new Student_ContactController;
Getting errors, :-(