class AssetsHelper extends CoreAssetsHelper
deprecated
AssetsHelper helps manage asset URLs.
Usage:
setCharset(string $charset) Sets the default charset. | from Helper | |
string | getCharset() Gets the default charset. | from Helper |
__construct(string $basePath = null, string|array $baseUrls = array(), string $version = null, string $format = null, array $namedPackages = array()) Constructor. | ||
setDefaultPackage(PackageInterface $defaultPackage) Sets the default package. | from CoreAssetsHelper | |
addPackage(string $name, PackageInterface $package) Adds an asset package to the helper. | from CoreAssetsHelper | |
PackageInterface | getPackage(string $name = null) Returns an asset package. | from CoreAssetsHelper |
string | getVersion(string $packageName = null) Gets the version to add to public URL. | from CoreAssetsHelper |
string | getUrl(string $path, string $packageName = null, string|bool|null $version = null) Returns the public path. | from CoreAssetsHelper |
string | getName() Returns the canonical name of this helper. | from CoreAssetsHelper |
Sets the default charset.
string | $charset | The charset |
Gets the default charset.
string | The default charset |
Constructor.
string | $basePath | The base path |
string|array | $baseUrls | Base asset URLs |
string | $version | The asset version |
string | $format | The version format |
array | $namedPackages | Additional packages indexed by name |
Sets the default package.
PackageInterface | $defaultPackage | The default package |
Adds an asset package to the helper.
string | $name | The package name |
PackageInterface | $package | The package |
Returns an asset package.
string | $name | The name of the package or null for the default package |
PackageInterface | An asset package |
InvalidArgumentException | If there is no package by that name |
Gets the version to add to public URL.
string | $packageName | A package name |
string | The version string |
Returns the public path.
Absolute paths (i.e. http://...) are returned unmodified.
string | $path | A path |
string | $packageName | The name of the asset package to use |
string|bool|null | $version | A specific version for the path |
string | The public path |
Returns the canonical name of this helper.
string | The canonical name |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Templating/Helper/AssetsHelper.html