Symfony\Component\Templating\Helper\CoreAssetsHelper
CoreAssetsHelper helps manage asset URLs.
Usage:
<code>
<img src="<?php echo $view['assets']->getUrl('foo.png') ?>" />
</code>
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class CoreAssetsHelper
extends Helper
implements
PackageInterface
{
- // members
- protected $defaultPackage;
- protected $namedPackages;
- // Inherited members from Helper
- protected string $charset;
- // methods
- public void __construct()
- public void setDefaultPackage()
- public void addPackage()
- public PackageInterface getPackage()
- public string getVersion()
- public string getUrl()
- public string getName()
- // Inherited methods from Helper
- public void setCharset()
- public string getCharset()
Hierarchy
Extends
Extended by
Implements
Members
protected
- $charset
- $defaultPackage
- $namedPackages
Methods
public
- __construct() — Constructor.
- addPackage() — Adds an asset package to the helper.
- getName() — Returns the canonical name of this helper.
- getPackage() — Returns an asset package.
- getUrl() — Returns the public path.
- getVersion() — Gets the version to add to public URL.
- setDefaultPackage() — Sets the default package.
Inherited from Symfony\Component\Templating\Helper\Helper
public
- getCharset() — Gets the default charset.
- setCharset() — Sets the default charset.