i have in console\controllers
class TestController extends Controller
{
public function actionTest()
{
Yii::$app->runAction('how?');
}
}
and
backend\modules\mytestmodule\controllers\MyTestControllers
public function actionCreate()
{
echo 1;
}
Is it possible to call runAction "actionCreate" in console "actionTest" ? Yii::$app->runAction('/backend/modules/mytestmodule/MyTest/actionCreate'); dont work
console config
return [
'id' => 'console',
'basePath' => dirname(__DIR__),
'controllerNamespace' => 'console\controllers',
'controllerMap' => [
'command-bus' => [
'class' => 'trntv\bus\console\BackgroundBusController',
],
'message' => [
'class' => 'console\controllers\ExtendedMessageController'
],
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationPath' => '@common/migrations/db',
'migrationTable' => '{{%system_db_migration}}'
],
'rbac-migrate' => [
'class' => 'console\controllers\RbacMigrateController',
'migrationPath' => '@common/migrations/rbac/',
'migrationTable' => '{{%system_rbac_migration}}',
'templateFile' => '@common/rbac/views/migration.php'
],
],
];