RitaHelper::action()

@param mixed $action
@param mixed $options
@return void
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);
    }
1309501
function launch($action) {

        global $CFG;

        // Get the action path and invoke it
        $actionsroot = "$CFG->dirroot/$CFG->admin/tool/xmldb/actions";
        $actionclass = $action . '.class.php';
        $actionpath = "$actionsroot/$action/$actionclass";

        // Load and invoke the proper action
        $result = false;
        if (file_exists($actionpath) && is_readable($actionpath)) {
            require_once($actionpath);
            if ($xmldb_action = new $action) {
                $result = $xmldb_action->invoke();
                if ($result) {
                    if ($xmldb_action->does_generate != ACTION_NONE &&
                        $xmldb_action->getOutput()) {
                        $this->does_generate = $xmldb_action->does_generate;
                        $this->title = $xmldb_action->title;
                        $this->str = $xmldb_action->str;
                        $this->output .= $xmldb_action->getOutput();
                    }
                } else {
                    $this->errormsg = $xmldb_action->getError();
                }
            } else {
                $this->errormsg = "Error: cannot instantiate class (actions/$action/$actionclass)";
            }
        } else {
            $this->errormsg = "Error: wrong action specified ($action)";
        }
        return $result;
    }
373089
public function action($action, $content, array $parameters = [], array $attributes = [])
    {
        $action = [$action, $parameters];

        $this->makeItem('action', compact('action', 'content', 'attributes'));
    }
1150379
public function execute(array $args, array $options = [])
    {
        if (!isset($args[0])) {
            throw new \InvalidArgumentException('arg action must be input');
        }
        $action = explode('::', $args[0]);
        if (!class_exists($action[0])) {
            throw new \InvalidArgumentException('action not not found!');
        }

        if (isset($args[1])) {
            $frequency = abs(intval($args[1]));
        } else {
            $frequency = null;
        }
        ProcessManage::addTask($action, $frequency);
    }
1192902
protected function getControllerAction($options)
    {
        if (is_array($options)) {
            return URL::action($options[0], array_slice($options, 1));
        }

        return URL::action($options);
    }
793503
public function setAction(string $action)
    {
        $string = new CamelCase($action);
        $this->action = $string->camelize();
    }
1251345
public function action($action, $parameters = array(), $absolute = true)
	{
		if ($this->rootNamespace && ! (strpos($action, '\\') === 0))
		{
			$action = $this->rootNamespace.'\\'.$action;
		}
		else
		{
			$action = trim($action, '\\');
		}

		if ( ! is_null($route = $this->routes->getByAction($action)))
		{
			 return $this->toRoute($route, $parameters, $absolute);
		}

		throw new InvalidArgumentException("Action {$action} not defined.");
	}
551439
public function addAction($action)
    {
        if ($action instanceof Action) {
            $action = $action->getName();
        }
        $this->actionList[] = $action;
        $this->valid = null;

        return $this;
    }
821589
public function setAction($action)
    {
        foreach ($this->routes as $route)
            $route->setAction($action);
        return $this;
    }
282165
protected static function doesActionApply($config, $action)
    {
        $excludeVerbMasks = intval(array_get($config, 'action'));
        $myActionMask = VerbsMask::toNumeric($action);

        return ($excludeVerbMasks & $myActionMask);
    }
144024
function delete($action,$params = array(),$options = array()){
		$options["method"] = "DELETE";
		return $this->_doRequest($action,$params,$options);
	}
423142
public function options(string $uri, string $controller, string $action)
    {
        $this->addRoute('OPTIONS', $uri, $controller, $action);
    }
695458
private function runAction($action, $args)
    {
        $function = $action['function'];
        $argsNumber = $action['arguments'];

        $class = (isset($function[0])) ? $function[0] : false;
        $method = (isset($function[1])) ? $function[1] : false;

        $args = $this->getArguments($argsNumber, $args);

        if (! ($class && $method) && function_exists($function)) {
            return call_user_func($function, $args);
        } elseif ($obj = call_user_func([$class, $this->singleton])) {
            if ($obj !== false) {
                return call_user_func_array([$obj, $method], $args);
            }
        } elseif (class_exists($class)) {
            $instance = new $class;

            return call_user_func_array([$instance, $method], $args);
        }
    }
877543
public function action(String $action = NULL)
    {
        $time = $this->redirect['time'];
        $data = $this->redirect['data'];

        $this->redirect = [];

        if( strstr(get_called_class() , 'Refresh') )
        {
            $exit = false;
            $type = 'refresh';
        }
        
        $this->location($action, $time, $data, $exit ?? true, $type ?? 'location');
    }
1180443
protected function actionRedirect($action)
    {
        if ($this->redirect)
        {
            return;
        }

        $this->redirect = $action->getAttribute('uri');
        /** @var TAdminUI $page */
        $page = Eresus_Kernel::app()->getPage();
        $this->redirect = $page->replaceMacros($this->redirect);
    }
1200033
public function setAction($action)
    {
        $this->getTabs()->each(function (TabInterface $tab) use ($action) {
            if ($tab instanceof FormInterface) {
                $tab->setAction($action);
            }
        });

        return $this;
    }
936285
protected function executeCliAction(Config\Action $action) : void
    {
        // since the cli has no straight way to communicate back to php
        // cli hooks have to handle sync stuff by them self
        // so no 'beforeAction' or 'afterAction' is called here
        $runner = new Action\Cli();
        $runner->execute($this->io, $action, $this->arguments);
    }