@param string $name
@param array  $parameters
@param bool   $relative

@return string
541309
public function getPath($name, $parameters = [], $relative = false)
    {
        return $this->generator->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH);
    }
1358055
public static function toRoute(string $name, string $text, $parameters = [], $absolute = true)
    {
        return static::to(route($name, $parameters, $absolute), $text);
    }
1362884
public function render($name, array $parameters = [])
    {
        $storage = $this->load($name);
        $key = hash('sha256', serialize($storage));
        $this->current = $key;
        $this->parents[$key] = null;

        // attach the global variables
        $parameters = array_replace($this->getGlobals(), $parameters);
        // render
        if (false === $content = $this->evaluate($storage, $parameters)) {
            throw new \RuntimeException(sprintf('The template "%s" cannot be rendered.', $this->parser->parse($name)));
        }

        // decorator
        if ($this->parents[$key]) {
            $slots = $this->get('slots');
            $this->stack[] = $slots->get('_content');
            $slots->set('_content', $content);

            $content = $this->render($this->parents[$key], $parameters);

            $slots->set('_content', array_pop($this->stack));
        }

        return $content;
    }
67458
public function getFaqIndexPermalink(array $parameters = [], $absolute = 1)
    {
        return $this->getContainer()->get('router')->generate($this->getFaqIndexRoute(), $this->getFaqIndexRouteParameters($parameters), $absolute);
    }
1343364
public function route($name, $parameters = [], $absolute = true)
    {
        return app('url')->route($this->prefixRoute($name), $parameters, $absolute);
    }
1122201
public function getFullRouteUrlByName($name, array $parameters = [])
    {
        $routeUrl = $this->router->getRouteUrlByName($name, $parameters);
        if ($routeUrl === null) {
            return null;
        }
        return $this->url->getUrl($routeUrl);
    }
644542
public function generate($name, array $params = [], $absolute = false)
    {
        $config = $this->container->get('Config');

        $path = '';
        if ($config->has('app.basepath')) {
            $path = $config->get('app.basepath');
        }

        $path .= $this->container->get('HttpDispatcher')->generate($name, $params);

        if ($absolute === true) {
            $uristr = (string)$this->request->getUri();

            // get uri up to (but excluding) third slash (http://example.com)
            // it's safe to assume the third slash won't occur within the first 8 chars
            $part = substr($uristr, 0, strpos($uristr, '/', 8));
            $path = $part.$path;
        }

        return $path;
    }
420453
public function renderComponent($name, $parameters = [])
    {
        $result = null;
        $previousContext = $this->componentContext;

        if ($componentObj = $this->findComponentByName($name)) {
            $componentObj->id = uniqid($name);
            $componentObj->setProperties(array_merge($componentObj->getProperties(), $parameters));
            $this->componentContext = $componentObj;
            $result = $componentObj->onRender();
        }

        if (!$result) {
            $result = $this->renderPartial($name.'::default', [], false);
        }

        $this->componentContext = $previousContext;
        return $result;
    }
252284
private function implicitReadStringValue(array $parameters, string $name): ?string
    {
        return array_key_exists($name, $parameters) === true && is_string($value = $parameters[$name]) === true ?
            $value : null;
    }
238241
public function render($name, array $parameters = array())
    {
        $storage = $this->load($name);
        $parameters = array_replace($this->getGlobals(), $parameters);

        $this->current = $key = sha1(serialize($storage));
        $this->parents[$key] = null;

        if (false === $content = $this->evaluate($storage, $parameters)) {
            throw new RuntimeException('The template cannot be rendered.');
        }

        if ($this->parents[$key]) {
            $content = $this->render($this->parents[$key], $parameters);
        }

        return $content;
    }
161022
public static function getPath( $name, $parameters = array(), $relative = false )
    {
        $serviceContainer = ezpKernel::instance()->getServiceContainer();

        return $serviceContainer->get('router')->generate(
            $name,
            $parameters,
            $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH
        );
    }
1270085
public function generate($name, $parameters = array(), $absolute = false)
    {
        $this->urlGenerator = new UrlGenerator($this->routeCollection, $this->context);

        return $this->urlGenerator->generate($name, $parameters, $absolute);
    }
1010920
public function get($name, $parameters = null)
    {
        $instance = parent::get($name, $parameters);

        if (is_object($instance) && $instance instanceof EventsAwareInterface) {
            if (!$instance->getEventsManager() && ($eventsManager = $this->getEventsManager())) {
                $instance->setEventsManager($eventsManager);
            }
        }

        return $instance;
    }
632321
protected function addCommand($name, array $parameters = array())
    {
        $this->commands[] = $command = $this->createCommand($name, $parameters);

        return $command;
    }
544900
public function route($name, $parameters = [], $secure = null)
    {
        if (! isset($this->app->router->namedRoutes[$name])) {
            throw new \InvalidArgumentException("Route [{$name}] not defined.");
        }

        $uri = $this->app->router->namedRoutes[$name];

        $parameters = $this->formatParameters($parameters);

        $uri = \preg_replace_callback('/\[([^\]]*)\]$/', function ($matches) use ($uri, &$parameters) {
            $uri = $this->replaceRouteParameters($matches[1], $parameters);

            return ($matches[1] == $uri) ? '' : $uri;
        }, $uri);

        $uri = $this->replaceRouteParameters($uri, $parameters);

        $uri = $this->to($uri, [], $secure);

        if (! empty($parameters)) {
            $uri .= '?'.\http_build_query($parameters);
        }

        return $uri;
    }
14982
public function render($name, array $parameters = array())
    {
        $device = $this->requestStack->getMasterRequest()->get($this->deviceTypeField);

        if (!is_null($device) && '' !== $device) {
            $name = $this->getTemplate($name, $device);
        }

        return parent::render($name, $parameters);
    }
1234822
public function query($name, $parameters = [])
    {
        if (!isset($parameters['APPID'])) {
            $parameters['APPID'] = $this->apiKey;
        }

        if (!isset($parameters['units'])) {
            $parameters['units'] = $this->units;
        }

        if (!isset($parameters['lang'])) {
            $parameters['lang'] = $this->lang;
        }

        $baseUrl = $this->apiUrl.$name;

        $requestQueryParts = [];
        foreach ($parameters as $key => $value) {
            $requestQueryParts[] = $key.'='.rawurlencode($value);
        }
        $baseUrl .= '?'.implode('&', $requestQueryParts);

        $response = $this->guzzleClient->get($baseUrl);
        $response = json_decode($response->getBody()->getContents());

        return $response;
    }