HttpFoundationExtension
class HttpFoundationExtension extends Twig_Extension
Twig extension for the Symfony HttpFoundation component.
Methods
getFunctions()
{@inheritdoc}
string
generateAbsoluteUrl(string $path)
Returns the absolute URL for the given absolute or relative path.
string
generateRelativePath(string $path)
Returns a relative path based on the current Request.
string
getName()
Returns the name of the extension.
Details
at line line 26
__construct(RequestStack $requestStack)
at line line 34
getFunctions()
{@inheritdoc}
at line line 53
string
generateAbsoluteUrl(string $path)
Returns the absolute URL for the given absolute or relative path.
This method returns the path unchanged if no request is available.
at line line 87
string
generateRelativePath(string $path)
Returns a relative path based on the current Request.
This method returns the path unchanged if no request is available.
at line line 105
string
getName()
Returns the name of the extension.