class AssetsHelper extends Helper
AssetsHelper helps manage asset URLs.
| protected | $charset | from Helper |
| setCharset(string $charset) Sets the default charset. | from Helper | |
| string | getCharset() Gets the default charset. | from Helper |
| __construct(Packages $packages) | ||
| string | getUrl(string $path, string $packageName = null) Returns the public url/path of an asset. | |
| string | getVersion(string $path, string $packageName = null) Returns the version of an asset. | |
| string | getName() Returns the canonical name of this helper. |
Sets the default charset.
| string | $charset | The charset |
Gets the default charset.
| string | The default charset |
| Packages | $packages |
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.
| string | $path | A public path |
| string | $packageName | The name of the asset package to use |
| string | The public path of the asset |
Returns the version of an asset.
| string | $path | A public path |
| string | $packageName | The name of the asset package to use |
| string | The asset version |
Returns the canonical name of this helper.
| string | The canonical name |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.html