mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-01 15:07:49 +08:00
Extracted inline action object creation, implemented it in console controller in order to use console inline action instead of base one
This commit is contained in:
@@ -9,7 +9,6 @@ namespace yii\console;
|
||||
|
||||
use Yii;
|
||||
use yii\base\Action;
|
||||
use yii\base\InlineAction;
|
||||
use yii\base\InvalidRouteException;
|
||||
use yii\helpers\Console;
|
||||
|
||||
@@ -60,6 +59,15 @@ class Controller extends \yii\base\Controller
|
||||
return $this->color === null ? Console::streamSupportsAnsiColors($stream) : $this->color;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return \yii\console\InlineAction
|
||||
*/
|
||||
protected function createActionObject($id, $methodName)
|
||||
{
|
||||
return new InlineAction($id, $this, $methodName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs an action with the specified action ID and parameters.
|
||||
* If the action ID is empty, the method will use [[defaultAction]].
|
||||
|
||||
Reference in New Issue
Block a user