Add an route link.

@return Html instance
11198
public function url($text, $url, $parameters = [], $secure = null)
    {
        return $this->addElement('a')->text($text)
            ->href(url($url, $parameters, $secure));
    }
493601
protected function createRoute()
    {
        $route = (array)$this->clientRoute;
        $route['id'] = $this->options['id'];
        if (!empty($this->filter)) {
            $route['filter'] = $this->filter;
        }
        if ($this->multiple) {
            $route['multiple'] = 1;
        }
        return $route;
    }
1162318
public function addBreadcrumb()
    {
        $this->updateBreadcrumbNode();

        $nodeId = $this->session->get('tl_page_node');

        if ($nodeId < 1) {
            return;
        }

        $trail = $this->getBreadcrumbTrail($nodeId);

        // Generate breadcrumb trail
        if (0 === count($trail)) {
            $this->session->set('tl_page_node', 0);

            return;
        }

        $this->checkTrailAccess($nodeId, $trail);
        $this->buildBreadcrumb($nodeId, $trail);
    }
57868
public function create()
    {
        $menu = $this->handler->add($this->name, $this->getAttribute('position'))
                    ->title($this->getAttribute('title'))
                    ->link($this->getAttribute('link'))
                    ->handles($this->menu['link'] ?? null);

        $this->attachIcon($menu);
        $this->handleNestedMenu();

        return $this;
    }
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;
    }
967437
public function setupRoutes()
    {
        if (!isset($this->routeManager)) {
            $config = $this->config();
            $routes = (isset($config['routes']) ? $config['routes'] : [] );

            $this->routeManager = new RouteManager([
                'config' => $routes,
                'app'    => $this->app(),
                'logger' => $this->logger
            ]);

            $this->routeManager->setupRoutes();
        }

        return $this;
    }
1048395
public function add() {
		if ($this->request->is('post')) {
			$this->Rubro->create();
			if ($this->Rubro->save($this->request->data)) {
				$this->Session->setFlash(__('The rubro has been saved.'));
				return $this->redirect(array('action' => 'index'));
			} else {
				$this->Session->setFlash(__('The rubro could not be saved. Please, try again.'));
			}
		}
		$proveedores = $this->Rubro->Proveedor->find('list');
		$this->set(compact('proveedores'));
	}
1317389
public static function add(Route $route)
    {
        exception_if(self::checkDuplicated($route), RouteDuplicatedException::class, $route);

        // Create new route for url ended with '/'
        $routeWithoutSlash = $route;
        $routeWithSlash = $route->getWithSlash();

        self::$register[$routeWithoutSlash->getName()] = $routeWithoutSlash;
        self::$register[$routeWithSlash->getName()] = $routeWithSlash;
    }
273746
protected function routeSetUpSelfRouteNameIfAny () {
		/** @var $this \MvcCore\Router */
		if ($this->currentRoute instanceof \MvcCore\IRoute) 
			$this->selfRouteName = $this->anyRoutesConfigured
				? $this->currentRoute->GetName()
				: $this->currentRoute->GetControllerAction();
		return $this;
	}
673921
public function addRoute(Route $route)
    {
        $this->routes[$route->getName()] = $route;

        $this->storage[] = $route;

        return $this;
    }
151244
private function addRoutes()
    {
        if (class_exists($Router = 'Josantonius\Router\Router')) {
            if (isset($this->complement['routes'])) {
                $Router::add($this->complement['routes']);
            }
        }
    }
1095997
public function AddLink()
    {
        $link = Controller::join_links(
            Director::absoluteBaseURL(),
            ShoppingCart::config()->url_segment,
            "usediscount",
            $this->Code
        );

        return $link;
    }
724289
public function createSelfLink()
    {
        // if no apiPath is not set generate it from basepath
        if (is_null($this->getApiPath())) {
            $class = explode('\\', get_class($this));
            $plural = Inflector::pluralize(strtolower(end($class)));
            $this->apiPath = $this->apiBasePath . '/' . $plural;
        }

        // add id to path
        $idPath = '';
        if ($this->getId()) {
            $idPath = '/' . $this->getId();
        }
        $this->_links = [
            'self' => $this->getApiPath() . $idPath,
        ];
    }
93967
public function build() : RouterInterface
    {
        $router = $this->router;
        foreach($this->routing_rules as $routing_rule => $events)
        {
            if (is_string($events)){
                try{
                    $router->bind($routing_rule, '*', $events);
                }
                catch(RoutingRuleBindingException $e)
                {
                    throw new RouterBuildingException('Rule binding failed:' . $routing_rule . ' event:' . $events, $e);
                }
            }
            else if (is_array($events)){
                foreach($events as $filter => $event){
                    try{
                        $router->bind($routing_rule, $filter, $event);
                    }
                    catch(RoutingRuleBindingException $e)
                    {
                        throw new RouterBuildingException('Rule binding failed:' . $routing_rule . ' event:' . $event . ' filter:' . $filter, $e);
                    }
                }
            }
        }
        return $router;
    }
989466
public function serve() {
        if(is_null($this->linkPath)) {
            $route = $this->fw->get('PARAMS.0');
            if($this->fw->exists('PARAMS.'.$this->routeKey))
                $route = preg_replace('/'.preg_quote($this->routeKeyPrefix.
                    $this->fw->get('PARAMS.'.$this->routeKey)).'$/','',$route);
            elseif(substr($route,-1) != '/')
                $route.= '/';
        } else
            $route = $this->linkPath;
        $this->fw->set('pg.route',$route);
        $this->fw->set('pg.prefix',$this->routeKeyPrefix);
        $this->fw->set('pg.currentPage',$this->current_page);
        $this->fw->set('pg.nextPage',$this->getNext());
        $this->fw->set('pg.prevPage',$this->getPrev());
        $this->fw->set('pg.firstPage',$this->getFirst());
        $this->fw->set('pg.lastPage',$this->getLast());
        $this->fw->set('pg.rangePages',$this->getInRange());
        $this->fw->set('pg.allPages',$this->getMax());
        $output = \Template::instance()->render($this->template);
        $this->fw->clear('pg');
        return $output;
    }
808568
public <Source extends RouteSource, Destination extends RouteDestination> RoutingBuilder add(Route<Source, Destination> route) {
        routes.add(route);
        return this;
    }
1084042
public function addAction()
    {
        $parent = $this->params()->fromRoute('parent');
        if (! is_numeric($parent)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The file location was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        $form = $this->getFileAddForm();
        $form->setAttribute(
            'action',
            $this->url()->fromRoute(
                'sc-admin/file/add',
                ['parent' => $parent]
            )
        );
        $request = $this->getRequest();

        if ($request->isPost()) {
            $post = array_merge_recursive(
                $request->getPost()->toArray(),
                $request->getFiles()->toArray()
            );
            $form->setData($post);
            if ($form->isValid()) {
                try {
                    $transfer = $this->getFileTransfer();
                    $data = $transfer->receive($form->getData());
                    $fileIds = $this->getFileService()->makeFiles(
                        $parent, $data
                    );
                    return $this->redirect()->toRoute(
                        'sc-admin/file/edit',
                        ['id' => implode(',', $fileIds)]
                    );
                } catch (Exception $e) {
                    if (isset($data)) {
                        $transfer->rollBack($data);
                    }
                    if ($e instanceof RuntimeException) {
                        $this->flashMessenger()->addMessage($e->getMessage());
                        return $this->redirect()
                            ->toRoute('sc-admin/content-manager')
                            ->setStatusCode(303);
                    } elseif (DEBUG_MODE) {
                        throw new DebugException(
                            $e->getMessage(),
                            $e->getCode(),
                            $e
                        );
                    }
                }
            }
        }
        return new ViewModel([
            'form' => $form,
        ]);
    }