class AssetsExtension extends Twig_Extension
deprecated
Twig extension for Symfony assets helper.
| __construct(ContainerInterface $container, RequestContext $requestContext = null) | ||
| array | getFunctions() Returns a list of functions to add to the existing list. | |
| string | getAssetUrl(string $path, string $packageName = null, bool $absolute = false, string|bool|null $version = null) Returns the public path of an asset. | |
| int | getAssetsVersion(string $packageName = null) Returns the version of the assets in a package. | |
| getName() {@inheritdoc} |
| ContainerInterface | $container | |
| RequestContext | $requestContext |
Returns a list of functions to add to the existing list.
| array | An array of functions |
Returns the public path of an asset.
Absolute paths (i.e. http://...) are returned unmodified.
| string | $path | A public path |
| string | $packageName | The name of the asset package to use |
| bool | $absolute | Whether to return an absolute URL or a relative one |
| string|bool|null | $version | A specific version |
| string | A public path which takes into account the base path and URL path |
Returns the version of the assets in a package.
| string | $packageName |
| int |
{@inheritdoc}
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.html