public function actionListActionOptions($action)
    {
        $result = Yii::$app->createController($action);

        if ($result === false || !($result[0] instanceof Controller)) {
            return;
        }

        /** @var Controller $controller */
        list($controller, $actionID) = $result;
        $action = $controller->createAction($actionID);
        if ($action === null) {
            return;
        }

        foreach ($controller->getActionArgsHelp($action) as $argument => $help) {
            $description = preg_replace("~\R~", '', addcslashes($help['comment'], ':')) ?: $argument;
            $this->stdout($argument . ':' . $description . "\n");
        }

        $this->stdout("\n");
        foreach ($controller->getActionOptionsHelp($action) as $argument => $help) {
            $description = preg_replace("~\R~", '', addcslashes($help['comment'], ':'));
            $this->stdout('--' . $argument . ($description ? ':' . $description : '') . "\n");
        }
    }
public function actionListActionOptions($action)
    {
        $result = Yii::$app->createController($action);

        if ($result === false || !($result[0] instanceof Controller)) {
            return;
        }

        
        list($controller, $actionID) = $result;
        $action = $controller->createAction($actionID);
        if ($action === null) {
            return;
        }

        foreach ($controller->getActionArgsHelp($action) as $argument => $help) {
            $description = preg_replace("~\R~", '', addcslashes($help['comment'], ':')) ?: $argument;
            $this->stdout($argument . ':' . $description . "\n");
        }

        $this->stdout("\n");
        foreach ($controller->getActionOptionsHelp($action) as $argument => $help) {
            $description = preg_replace("~\R~", '', addcslashes($help['comment'], ':'));
            $this->stdout('--' . $argument . ($description ? ':' . $description : '') . "\n");
        }
    }
public function actionListActionOptions ( $ action ) { $ result = Yii :: $ app -> createController ( $ action ) ; if ( $ result === false || ! ( $ result [ 0 ] instanceof Controller ) ) { return ; } /** @var Controller $controller */ list ( $ controller , $ actionID ) = $ result ; $ action = $ controller -> createAction ( $ actionID ) ; if ( $ action === null ) { return ; } foreach ( $ controller -> getActionArgsHelp ( $ action ) as $ argument => $ help ) { $ description = preg_replace ( "~\R~" , '' , addcslashes ( $ help [ 'comment' ] , ':' ) ) ? : $ argument ; $ this -> stdout ( $ argument . ':' . $ description . "\n" ) ; } $ this -> stdout ( "\n" ) ; foreach ( $ controller -> getActionOptionsHelp ( $ action ) as $ argument => $ help ) { $ description = preg_replace ( "~\R~" , '' , addcslashes ( $ help [ 'comment' ] , ':' ) ) ; $ this -> stdout ( '--' . $ argument . ( $ description ? ':' . $ description : '' ) . "\n" ) ; } }
List all available options for the $action in machine readable format.
This is used for shell completion.

@param string $action route to action
@since 2.0.11
List all available options for the $action in machine readable format . This is used for shell completion .