@param string $action

@return ButtonInterface
358308
public function setAction(string $action = ''): ButtonInterface
    {
        if ($this->isVisibility()) {
            $this->action = $action;
        }

        return $this;
    }
584485
public function forward($action)
    {
        if (is_string($action)) {
            $parts = explode('/', ltrim($action, '/'));
            if (count($parts) == 1) {
                array_unshift($parts, $this->dispatcher->getControllerName());
            }
            $action = array('controller' => $parts[0], 'action' => $parts[1]);
        }
        return $this->dispatcher->forward($action);
    }
783025
public function getActionButtons($action, $object = null)
    {
        $list = $this->configureActionButtons($action, $object);

        foreach ($this->getExtensions() as $extension) {
            // TODO: remove method check in next major release
            if (method_exists($extension, 'configureActionButtons')) {
                $list = $extension->configureActionButtons($this, $list, $action, $object);
            }
        }

        return $list;
    }
1247881
private function executeAction(string $action)
    {
        list($controller, $method) = explode('@', $action);

        $class = '\App\Controllers\\'.ucfirst($controller).'Controller';

        if (!class_exists($class)) {
            throw new ExceptionHandler('Class "'.$class.'" not found.');
        }

        $controllerInstantiate = new $class();

        if (!method_exists($controllerInstantiate, $method)) {
            throw new ExceptionHandler('Method "'.$method.'" not found in '.$class.'.');
        }

        return call_user_func_array([new $controllerInstantiate, $method], []);
    }
786882
public function dispatchTo($action)
    {
        $this->setAction($action);

        $this->hook->action(
            'init',
            [$this, 'hooks']
        )->dispatch();

        return $this;
    }
297476
public function getOnAction($action)
    {
        $action = trim($action);

        if (empty($action)) {
            return null;
        }

        return Helpers::postFixWith($action, ';');
    }
940156
public function Link($action = null)
    {
        return Controller::join_links(
            parent::Link(),
            $this->config()->url_segment,
            $action
        );
    }
511579
public function RelativeLink($action = null)
    {
        return Controller::join_links(
            Director::baseURL(),
            $this->Link($action)
        );
    }
1040387
public function addAction($action)
    {
        if (!$action instanceof ActionInterface) {
            return $this;
        }

        $name = $action->getIdentifier();

        if (empty($name)) {
            return $this;
        }

        $this->actions[] = $action;

        return $this;
    }
107110
private function getControllerLogic($action)
    {
        list($class, $method) = getClassAndMethodFromString($action);
        $controllerClass = fixClassname(Router::$namespace, $class);

        //Todo: Dependency Injection
        /* @var $controller Controller */
        $controller = new $controllerClass();
        if (!$controller instanceof Controller) {
            throw new Exception("$class does not extend Controller");
        }
        $this->controllerMiddleware = $controller->getMiddlewares();
        return function ($request) use ($controller, $method) {
            //Todo: Dependency Injection
            return $controller->$method($request);
        };
    }
353618
public function doAction($action)
    {
        $controller = $this->getOption('hooks-controller');
        $instance = $this->getControllerInstance($controller);

        if (is_object($instance) && method_exists($instance, $action)) {
            $response = call_user_func([$instance, $action]);
        }

        $this->setAction('');

        return isset($response);
    }
166886
private function createCallableFromAction($action) : callable
    {
        // Check if this looks like it could be a class/method string
        if (!is_callable($action) && is_string($action)) {
            return $this->convertClassStringToFactory($action);
        }

        return $action;
    }
1299247
protected function setAction($action)
    {
        $this->action = trim(strtoupper($action));

        //	Check verb aliases, set correct action allowing for closures
        if (null !== ($alias = array_get($this->verbAliases, $this->action))) {
            //	A closure?
            if (in_array($alias, Verbs::getDefinedConstants()) || !is_callable($alias)) {
                //	Set original and work with alias
                $this->originalAction = $this->action;
                $this->action = $alias;
            }
        }

        return $this;
    }
1114771
protected function getIconClass($action) {
        if (in_array($action, ['add', 'remove', 'clone', 'drag-handle'])) {
            return $this->iconMap[$action];
        }

        if (YII_DEBUG) {
            throw new InvalidConfigException('Out of bounds, "' . $action . '" not found in your iconMap');
        }
        return '';
    }
581289
public function Link($action=null) {
        $link = Controller::join_links(
            $this->stat('url_base', true),
            $this->stat('url_segment', true), // in case we want to change the segment
            '/', // trailing slash needed if $action is null!
            "$action"
        );
        
        $this->extend('updateLink', $link);
        return $link;
    }
324256
final public function render($action)
    {
        // Initialize view object if auto render is enable
        if (Configuration::read('mvc.view.auto_render') === true) {
            $this->setView($this->controller, $action);
        }
        // Initialize layout object if auto render is enable
        if (Configuration::read('mvc.layout.auto_render') === true) {
            // Get Layout default name from Configuration
            $layoutName = Configuration::read('mvc.layout.default');
            $this->setLayout($layoutName);
        }
        // Call initialize method in Controller if exists
        if (method_exists($this, 'initialize')) {
            $this->initialize();
        }
        // Launch action of controller
        ob_start();
        $actionResult = $this->$action();
        echo PHP_EOL;
        $bodyContent = ob_get_clean();
        // If Controller's Action return false, disable Layout and View
        if ($actionResult !== false) {
            if (isset($this->layout) && $this->layout->getAutoRender()) {
                // Get Layout and View if auto render of View enable
                $bodyContent .= $this->layout->render();
            } elseif (isset($this->view) && $this->view->getAutoRender()) {
                // Get View only
                $bodyContent .= $this->view->render();
            }
        }
        return $bodyContent;
    }
1038604
public function setAction($action)
    {
        $context = $this->_context;

        $context->action = lcfirst(Text::camelize($action));

        return $this;
    }