$this->requestStack =
$requestStack;
} public function getFunctions(): array
{ return [ new TwigFunction('link',
$this->
link(...
)),
new TwigFunction('preload',
$this->
preload(...
)),
new TwigFunction('dns_prefetch',
$this->
dnsPrefetch(...
)),
new TwigFunction('preconnect',
$this->
preconnect(...
)),
new TwigFunction('prefetch',
$this->
prefetch(...
)),
new TwigFunction('prerender',
$this->
prerender(...
)),
];
} /**
* Adds a "Link" HTTP header.
*
* @param string $rel The relation type (e.g. "preload", "prefetch", "prerender" or "dns-prefetch")
* @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]")
*
* @return string The relation URI
*/