Extension\AssetExtension (Bridge\Twig)
Symfony\Bridge\Twig\Extension\AssetExtension
class AssetExtension extends Twig_Extension
Twig extension for the Symfony Asset component.
Methods
__construct(Packages $packages) | ||
getFunctions() {@inheritdoc} | ||
string | getAssetUrl(string $path, string $packageName = null) Returns the public url/path of an asset. | |
string | getAssetVersion(string $path, string $packageName = null) Returns the version of an asset. | |
string | getName() Returns the name of the extension. |
Details
public __construct(Packages $packages)
public getFunctions()
{@inheritdoc}
public string getAssetUrl(string $path, string $packageName = null)
Returns the public url/path of an asset.
If the package used to generate the path is an instance of UrlPackage, you will always get a URL and not a path.
public string getAssetVersion(string $path, string $packageName = null)
Returns the version of an asset.
public string getName()
Returns the name of the extension.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Bridge/Twig/Extension/AssetExtension.html