Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Call another controller's action

$
0
0

I have one question:
Is it possible to call another controlerr's action from actual controller?

example:
class actualControler extends CController {

public function actionOne() {

$fromAnother = <here I want to call anoterAction>;

$this->render('one',array('fromAnother'=>$fromAnother));

}

}

class anotherController extends CController {

public function anotherAction() {

// do something and return it

}

}




I want to call anoterController anotherAction from actualController actionOne
what do you think? is it possible?

both of controllers are in other files, of course ;-)


Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>