Set action

format with controller: controller.action

@param   string  $action
970111
public function setAction($action)
    {
        if ($action instanceof Closure)
        {
            $this->action = $action;
            return;
        }
        else if (is_array($action) && is_callable($action))
        {
            $this->action = $action;
            return;
        }
        else if (strpos($action, '::') > 0)
        {
            $this->action = explode('::', $action);
            return;
        }

        $names = explode('.', $action);
        if (count($names) > 1) {
            $controller = array_shift($names);
            $action = array_shift($names);
            $this->setController($controller);
        } else {
            $action = array_shift($names);
        }
        $this->action = $action;
    }
44068
protected function setShowRoute($controller, $action): Controller
    {
        $this->routes['get'] = array_merge($this->routes['get'], [
            "/$controller/$action/{:id}/" => Inflector::classify($controller) . '@' . $action,
        ]);

        return $this;
    }
677438
public function actionResolver($action)
    {
        if(is_string($action)) {
            $this->setFunctionName(Str::camel($action));
        } elseif (is_callable($action)) {
            $this->setCallback($action);
        } else {
            $this->setData($action);
        }

        return $this;
    }
322669
public function action($action, $options = array())
    {

        if (is_string($action)) {
            $action = RitaConfig::read('Utility.Actions.'.$action);
            if (!empty($options)) {
                $action= Hash::merge($action, $options);
            }
        }
        extract($action);
        $View = $this->_View;
        $title = $this->Html->image($options['icon']);
        unset($options['icon']);
        $options['escape'] = false;
        $options['class'] = 'action ';
        $link = $this->Html->link($title, $url, $options, $confirmMessage);

        $View->prepend('ViewActions', $link);
    }
424571
public function setAction($action)
        {
            if (null !== $action && !is_string($action)) {
                throw new Exception(
                    'Invalid argument: $action must be a string or null'
                );
            }

            $this->_action    = $action;
            $this->_hrefCache = null;

            return $this;
        }
1065220
protected function getActionUrl($action) : string
    {
        $context = Context::getInstance();
        return $context->getUrl($context->getParameter('controller_path') . $action);
    }
551439
public function addAction($action)
    {
        if ($action instanceof Action) {
            $action = $action->getName();
        }
        $this->actionList[] = $action;
        $this->valid = null;

        return $this;
    }
1057216
protected function isActionController($action)
    {
        if ($action instanceof Closure) {
            return false;
        }

        return is_string($action) || is_string(isset($action['uses']) ? $action['uses'] : null);
    }
441458
public function setCurrentAction($action): void
    {
        if (!$action instanceof Action) {
            $action = $this->getAction($action);
        }
        $this->currentAction = $action;
    }
284396
protected function set_language_alias( $action )
	{
		// create langugage aliases
		$name = explode( '::', $this->name );
		
		if ( isset( $name[1] ) )
		{
			$prefix = $name[0].'::';
			$name = $name[1];
		}
		else
		{
			$prefix = '';
			$name = $name[0];
		}
		
		if ( empty( $action ) )
		{
			$action = static::$_default_action;
		}
		
		CCLang::alias( ':controller', $prefix.'controller/'.strtolower( $name ) );
		CCLang::alias( ':action', $prefix.'controller/'.strtolower( $name.'.'.$action ) );
	}
784200
public function setAdapterAction($action)
    {
        if (true===$this->isInited) {
            $this->resetOutput();
        }
        $this->__adapter_action = $action;
        return $this;
    }
285386
public void setAction(String action)
    {
        ExtendedInfo info = getInfo(action);
        if (info != null)
            info._action = action;
    }
595612
public function prep($action = null)
    {
        $method = $this->getSetupMethod($action);

        if (!is_null($method)) {
            $method->invokeArgs($this->reflection->newInstance(), array('action' => $action));
        }

        $this->sortParams();
    }
860381
protected function actionReferencesController($action)
    {
        if (! $action instanceof Closure) {
            return is_string($action) || (isset($action['uses']) && is_string($action['uses']));
        }

        return false;
    }
875572
protected function _runFunction($action)
    {
        $controller = $this->_current['controller'];

        $path = $controller . '.' . $action . '.function';

        $function = Hash::get(self::$_data, $path);

        $this->_selected['action'] = $action;

        if ($function) {
            $function($this, $this->Controller);
        }
    }
1344994
public function setAction($action)
    {
        if (gettype($action) !== 'string') {
            throw new BadParametersException(
                sprintf(
                    ' The action type ("%s") must be a string',
                    gettype($action)
                )
            );
        }
        $this->action = $action;
        return $this;
    }
1058073
protected function setAddRoute($controller, $action): Controller
    {
        $callTo = Inflector::classify($controller) . '@' . $action;

        $this->routes['get'] = array_merge($this->routes['get'], [
            "/$controller/$action/" => $callTo,
        ]);

        $this->routes['post'] = [
            "/$controller/$action/" => $callTo,
        ];

        return $this;
    }