9

What is the equivalent function of:

Yii::app()->runController('controller/action')

in Yii2? I would like to call a action from another controller in current controller.

Thanks.

TResponse
  • 3,940
  • 7
  • 43
  • 63
Maulana Yusuf
  • 337
  • 2
  • 4
  • 16

1 Answers1

26

This may work:

Yii::$app->runAction('controller/action');
felipe.zkn
  • 2,012
  • 7
  • 31
  • 63