Set the item to be a route.

@param string $name
@param array  $parameters

@return HnhDigital\NavigationBuilder\Item
337804
public function route($name, $parameters = [])
    {
        $this->link_type = self::LINK_ROUTE;
        $this->link_value = [$name, $parameters];
        $this->checkActive();

        return $this;
    }
291566
public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)
    {
        $ret = $this->router->generate($name, $parameters);
        if ($ret === false) {
            throw new RouteNotFoundException('Unable to generate route for: ' . $name);
        }

        return $ret;
    }
1190260
public function url(string $name, array $params = []): string
    {
        return $this->core->router->generate($name, $params);
    }
818528
public function fromRoute($name, array $params = [])
    {
        $router = $this->getRouter();
        $route  = $router->get($name);

        return $route->assemble($params);
    }
413631
public function functionPath(string $name, array $parameters = []): string
    {
        return $this->getApp()->getService('routing')->generate($name, $parameters);
    }
313274
public function parameters(array $parameters): HttpRequest
    {
        foreach ($parameters as $name => $value) {
            $this->parameter($name, $value);
        }

        return $this;
    }
337068
public function route($name, $parameters = [])
    {
        $route = router()->route($name);
        if (is_null($route)) {
            throw new \Exception("Route name [$name] not found");
        }

        $route_url = $route->url($parameters);

        return $this->to($route_url);
    }
155143
public function setParameter($name, $parameter)
  {
    if ($this->isLocked()) {
      return $this->getObj()->setParameter($name, $parameter)->setLocked();
    } else {
      return parent::setParameter($name, $parameter);
    }
  }
1169793
public function assertRedirectedToRoute($name, $parameters = [], $with = [])
    {
        return $this->assertRedirectedTo($this->app['url']->route($name, $parameters), $with);
    }
458339
protected function generateUrl($name, $parameters = array(), $referenceType = RouterInterface::ABSOLUTE_PATH)
    {
        return $this->router->generate($name, $parameters, $referenceType);
    }
1299309
public function setParameters(array $parameters)
    {
        $this->_parameters       = array();
        $this->_parameterNameMap = array();
        $this->addParameters($parameters);
        return $this;
    }
978559
public function getRouteUrlByName($name, array $parameters = [])
    {
        $route = $this->getRouteByName($name);
        if (!$route) {
            return null;
        }
        return $route->buildUrlWithParameters($parameters);
    }
534203
protected function generateRoute($name, $parameter = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_URL)
    {
        return $this->getRouter()->generate($name, $parameter, $referenceType);
    }
844615
protected function getRoute($name, $parameters = [], $absolute = true)
    {
        return route($this->getRouteName($name), $parameters, $absolute);
    }
965
public function getRouteDefinitionByName(string $name): RouteDefinition
    {
        if (!isset($this->routesByName[$name])) {
            throw new \InvalidArgumentException("Invalid route name '$name'");
        }

        return $this->getRouteDefinition($this->routesByName[$name]);
    }
1131822
public function url($name, $params = array())
	{
		if ( ! array_key_exists($name, $this->routes))
		{
			throw new \UnexpectedValueException("A route with the name {$name} was not found");
		}

		$route = $this->routes[$name];
		return $route->url($params);
	}
121525
public function callRoute($name, array $parameters = [], array $options = [])
    {
        try {
            $content = $this->router->dispatchRoute($name, $parameters, $options);
        } catch (\Exception $e) {
            return sprintf('<p style="display:block;boder:1px solid red;" class="error">%s</p>', $e->getMessage());
        }

        return is_string($content) ? $content : '';
    }