WebLinkExtension
class WebLinkExtension extends AbstractExtension
Twig extension for the Symfony WebLink component.
Methods
getFunctions()
{@inheritdoc}
string
link(string $uri, string $rel, array $attributes = array())
Adds a "Link" HTTP header.
string
preload(string $uri, array $attributes = array())
Preloads a resource.
string
dnsPrefetch(string $uri, array $attributes = array())
Resolves a resource origin as early as possible.
string
preconnect(string $uri, array $attributes = array())
Initiates a early connection to a resource (DNS resolution, TCP handshake, TLS negotiation).
string
prefetch(string $uri, array $attributes = array())
Indicates to the client that it should prefetch this resource.
string
prerender(string $uri, array $attributes = array())
Indicates to the client that it should prerender this resource .
Details
string
dnsPrefetch(string $uri, array $attributes = array())
Resolves a resource origin as early as possible.
string
preconnect(string $uri, array $attributes = array())
Initiates a early connection to a resource (DNS resolution, TCP handshake, TLS negotiation).