Generate reset route for the button view
@param type $route
@param type $extraParams
@return type
336881
public function getResetPath($route, $extraParams = array())
    {
        $params = array(
            $this->getActionParameterName() => $this->getResetActionParameterName(),
            $this->getDatagridParameterName() => $this->getName(),
        );
        return $this->container->get('router')->generate($route, array_merge($params, $extraParams));
    }
813851
public function route($route, $params = [])
    {
        $this->url(
            $this->container->make('url')->route($route, $params)
        );

        return $this;
    }
818200
final public static function route(array $params)
    {

        if (!FEnv::isset("framework.smarty.called")) {
            FEnv::set("framework.smarty.called", 1);
        }
        $im = new \iumioFramework\Core\Masters\MasterCore();

        if (!isset($params['name'])) {
            throw new \Exception("The parameter [name] is missing to generate a valid route", E_ERROR);
        }
        $route = ($im->generateRoute(((isset($params['name']))? $params['name'] : ""), ((isset($params['params']) &&
            !empty($params['params']))? $params['params']  : null), ((isset($params['appname']) &&
            !empty($params['appname']))? $params['appname']  : null), ((isset($params['component']) &&
            $params['component'] == "yes")? true  : false)));
        return ($route);
    }
550863
public function appendRoute(Route $route)
    {
        if (!$originalRoute = optional($this->routes)[$route->slug()]) {
            return "Route {$route->slug()} not found";
        }

        return $this->routes[$route->slug()]['groups'] =
            $originalRoute['groups']->merge($route->get()['groups']);
    }
724972
private function _setParamsToRoute($route, $params)
    {
        foreach ($params as $key => $value)
        {
            $route = preg_replace('/\{' . $key . '\}/', $value, $route);
        }

        return $route;
    }
673399
protected function render_route($route, $params = []) {

        $output = false;

        if (isset($this->routes[$route])) {

            $ret = null;

            if (\is_callable($this->routes[$route])){
                $ret = \call_user_func($this->routes[$route], $params);
            }

            if (!is_null($ret)){
                return $ret;
            }
        }

        return $output;
    }
875708
public static function routeLink($text, $route, $parameters = [], $link_attributes = [], $extra_link = '')
    {
        $element = self::createElement('a')->text($text)
            ->href(route($route, $parameters).$extra_link);

        foreach ($link_attributes as $method_name => $value) {
            if (method_exists($element, $method_name)) {
                if (!is_array($value)) {
                    $value = [$value];
                }
                $element->$method_name(...$value);
            }
        }

        return $element;
    }
179711
public function getFromRevisionId( $id, array $extraParams = [] ) {
		$result =
			$this->api->getRequest(
				new SimpleRequest(
					'query',
					$this->getQuery( [ 'revids' => $id ], $extraParams )
				)
			);

		return $this->newPageFromResult( array_shift( $result['query']['pages'] ) );
	}
984704
public function to($path, $extra = array(), $secure = null)
    {

        // Page object passed
        if(is_object($path) && $path instanceof SiteTreeNodeInterface){
            if(starts_with($path->getPath(),'http:')){
                $path = $path->getPath();
            }
            else{
                $path = $this->getPathFinder()->toPage($path);
            }
        }

        // PageTypeId passed
        elseif (is_string($path) && $this->pageTypes->has($path)) {

            $path = $this->getPathFinder()->toPageType($path);

        }

        // Path passed inside CMS-SiteTree
        elseif (is_string($path) && $this->currentCmsPathProvider->
                                        getCurrentCmsPath()
                                            ->isCmsPath()) {

            if ($extra && !isset($extra[0])) {
                $extra = array_values($extra);
                $extraPath = implode('/',$extra);
                $path = trim($path,'/') . '/' . trim($extraPath,'/');
                $extra = [];
            }

            if ($path == '/' && $this->getTreeScope()) {
                $path = trim($this->getTreeScope()->getPathPrefix() . $path, '/');
            }
        }

        elseif ($path == '/' && $treeScope = $this->getTreeScope()) {
            $path = trim($treeScope->getPathPrefix() . $path, '/');
        }

        return parent::to($path, $extra, $secure);
    }
750386
public function createMenuFromOptions(
        array $options,
        array $defaultRouteParams = array(),
        array $extra = array()
    ) {
        $routeParams = array();

        $factory = $this->createFactory($defaultRouteParams, $routeParams, $extra);

        return $factory->createFromArray($options);
    }
676963
public function setRoute($route)
        {
            if (null !== $route && (!is_string($route) || strlen($route) < 1)) {
                throw new Exception(
                    'Invalid argument: $route must be a non-empty string or null'
                );
            }

            $this->_route     = $route;
            $this->_hrefCache = null;

            return $this;
        }
692112
public function setRoute(string $route = null, array $params = []): ButtonInterface
    {
        if ($this->isVisibility()) {
            if ($route === null) {
                $url = '#';
            } else {
                $url = '#';
                if (app('router')->has($route)) {
                    $url = route($route, $params);
                } else {
                    $this->setVisible(false);
                }
            }
            $this->setUrl($url);
        }

        return $this;
    }
192755
public function setRoute(DataSourceViewInterface $dataSource, $route, array $additional_parameters = [])
    {
        $this->routes[$dataSource->getName()] = $route;
        $this->additional_parameters[$dataSource->getName()] = $additional_parameters;
    }
801477
public function redirectRoute($route, $parameters = [], $absolute = true)
    {
        $this->url = route($route, $parameters, $absolute);

        return $this;
    }
972644
public function getRedirectToRoute($route, $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH, $status = Response::HTTP_FOUND, $routeFragment = null)
    {
        $url = $this->getRouter()->generate($route, $parameters, $referenceType);
        if (null !== $routeFragment) {
            $url = sprintf('%s#%s', $url, $routeFragment);
        }

        return new RedirectResponse($url, $status);
    }
1223611
public function generateUrl($route, array $parameters = array(), $absolute = false)
    {
        return $this->getContainer()->get('router')->generate($route, $parameters, $absolute);
    }
285416
protected function getUrl($route, $params = array())
    {
        $urlHelper = $this->getView()->plugin('url');

        if ('#' === $route[0]) {
            return $route;
        }

        return $urlHelper($route, $params, $this->getRouteOptions());
    }