code: public function urlFunction($route, array $params = []) {
          return $this->container['url_generator']->generate($route, $params, UrlGeneratorInterface::ABSOLUTE_URL);
      }
docs: Generate absolute URL path.
  
  @param string $route  Route name
  @param array  $params Parameters
  
  @return string