Set the action and parameters that can be used to return to the current page.

@param string $action The action for the current page
@param array $params An array of name value pairs which form the parameters
to return to the current page.
@return void
438901
public function register_return_link($action, $params) {
        global $PAGE;
        $params['action'] = $action;
        $cm = $this->get_course_module();
        if ($cm) {
            $currenturl = new moodle_url('/mod/assign/view.php', array('id' => $cm->id));
        } else {
            $currenturl = new moodle_url('/mod/assign/index.php', array('id' => $this->get_course()->id));
        }

        $currenturl->params($params);
        $PAGE->set_url($currenturl);
    }
893764
protected function buildFormParams(array $params, $action)
    {
        $params = $this->addCommonParams($params, $action);

        return $this->addSignature($params);
    }
1091541
protected function setView($action)
    {
        if (View::exists($this->className . '/' . $action)) {
            $this->view = new View($this->className . '/' . $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;
    }
240580
public function load(Action $action)
    {
        if (! is_null($this->argument)) {
            $this->argument->load($action);
        }
    }
265202
public Api getActionResult(String action, String params) throws Exception {
    Api result = this.getActionResult(action, params, null, null);
    return result;
  }
328192
protected function renderAction(array $parameters = [], Action $action = null)
    {
        $response = new Response();
        $response->setContent($this->getTemplate($action)->render($parameters));

        return $response;
    }
1263497
protected function addAction($action)
    {
        $args = func_get_args();
        array_shift($args);
        $this->actionQueue []= array('action' => $action, 'args' => $args);
    }
1078031
protected function runActionMethod($action, $vars = array()) {
		return call_user_func_array(
		    array($this, $action),
            $this->getActionArguments($action, $vars)
        );
	}
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);
    }
115562
public function execute($action, array $parameters = []) {
        $result = null;
        if (is_string($action)) {
            $actionParts = explode("@", $action);
            $controllerClass = $actionParts[0];
            $controllerMethodName = sizeof($actionParts) > 1 ? $actionParts[1] : "index";
            $controller = Controllers::get($controllerClass);
            if ($controller == null) {
                throw new ActionNotFoundException ( "Controller \"$controllerClass\" not found !!");
            }
            if (method_exists($controller, $controllerMethodName)) {
                $controllerMethodParams = $this->getParameterValues(new ReflectionMethod($controller, $controllerMethodName), $parameters);
                $result = call_user_func_array([$controller, $controllerMethodName], $controllerMethodParams);
            }
            else {
                throw new ActionNotFoundException ("Method \"$controllerMethodName\" not found in controller \"$controllerClass\" !!");
            }
        }
        else if (is_callable($action)) {
            $actionParams = $this->getParameterValues(new ReflectionFunction($action), $parameters);
            $result = call_user_func_array($action, $actionParams);
        }
        return $result;
    }
731556
protected function forwardAction ($action, $params=array())
    {
        // Get controller public name
        $ctrlPubName = \Teon\Base\Stdlib\ClassUtils::getPublicControllerName(get_class($this));

        // Get original parameters
        $paramsOrig = $this->params()->fromRoute();

        // Combine parameters - if action is explicitly specified in params it is overriden
        $params2pass = array_merge(
            $paramsOrig,
            $params,
            array('action' => $action)
        );

        // Do the forward
        return $this->forward()->dispatch($ctrlPubName, $params2pass);
    }
408676
public function execute( $action = null, $params = array() ) 
	{
		$this->set_language_alias( $action );
		
		// reset the response
		$this->response = null;
		$this->output = null;
		
		// fix notice
		$return = null;
		 
		if ( is_null( $action ) ) 
		{
			$action = static::$_default_action;
		}
		
		// capture all output made in the controller
		ob_start();
		
		// run wake event
		if ( method_exists( $this, 'wake' ) ) 
		{
			$return = call_user_func_array( array( $this, 'wake' ), $params );
		}
		
		// do we already have an resposne from the wake event?
		if ( !$return instanceof CCResponse )
		{
			// check if we got a custom action handler
			if ( !is_null( static::$_action_handler ) ) 
			{
				$return = call_user_func( array( $this, static::$_action_handler ), $action, $params );
			} 
			// normal action
			else
			{
				// check if the action exists
				if ( method_exists( $this, static::$_action_prefix.$action ) )
				{
					$return = call_user_func_array( array( $this, static::$_action_prefix.$action ), $params );
				}
				else 
				{
					$return = CCResponse::error( 404 );
				}
			}
		}
		
		// get the output
		$this->output = ob_get_clean();
		
		// do we got a response now?
		if ( $return instanceof CCResponse ) 
		{
			$this->response = $return;
		}
		// or a string
		elseif ( !empty( $return ) && is_string( $return ) )
		{
			$this->response = $this->_respond( $return );
		}
		
		// do we got a valid response if not use controller output		
		if ( !$this->response instanceof CCResponse ) 
		{
			$this->response = $this->_respond( $this->output );
		}
		
		// run sleep event
		if ( method_exists( $this, 'sleep' ) ) 
		{
			call_user_func_array( array( $this, 'sleep' ), $params );
		}
		
		// return thaaaaat
		return $this->response;
	}
441458
public function setCurrentAction($action): void
    {
        if (!$action instanceof Action) {
            $action = $this->getAction($action);
        }
        $this->currentAction = $action;
    }
824399
public function handle(Action $action)
    {
        $this->action = $action;
        $ref          = $action->getRef();
        $el           = $action->getElement();

        $this->query = str_ensure_left($action->param(0), '\\');

        // transform <a> attributes that wont matter modifiers
        $el->setAttribute('class', $el->getAttribute('class') . ' phpdoc-link');
        $el->setAttribute('href', $ref->phpdoc->url($action->param(0)));


        if ( $action->containsModifier('popover') ) {
            $this->popover();
        } elseif ( $action->containsModifier('modal') ) {
            $this->modal();
        } elseif ( $action->containsModifier('type') ) {
            $this->type();
        }
    }
821589
public function setAction($action)
    {
        foreach ($this->routes as $route)
            $route->setAction($action);
        return $this;
    }
592415
public function goToAction($action, $params = [])
    {
        return $this->request->goToPage($this->getName(), $action, $params);
    }