Calling runaction between different modules in yii2



1、 Call the same controller under different action modules

// in the first mock exam of frontend\controllers\TestController\actionTest,
//Frontend / Controllers / newcontroller / actionnewaction method


2、 Call actions under different modules

// in the frontend\controllers\TestController\actionTest method, call another module.
//The method of backend / Controllers / newcontroller / actionnewaction
return (new NewController($this->id, $this->module))->runAction('new-action');