class AssetsHelper extends CoreAssetsHelper
deprecated
since 2.7, will be removed in 3.0. Use the Asset component instead.
AssetsHelper helps manage asset URLs.
Usage:
Methods
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 |
Details
setCharset(string $charset)
Sets the default charset.
string getCharset()
Gets the default charset.
__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.
addPackage(string $name, PackageInterface $package)
Adds an asset package to the helper.
PackageInterface getPackage(string $name = null)
Returns an asset package.
string getVersion(string $packageName = null)
Gets the version to add to public URL.
string getUrl(string $path, string $packageName = null, string|bool|null $version = null)
Returns the public path.
Absolute paths (i.e. http://...) are returned unmodified.
string getName()
Returns the canonical name of this helper.
Please login to continue.