Asset
in package
implements
AssetInterface
Class Asset
Tags
Interfaces, Classes and Traits
- AssetInterface
- Interface AssetInterface
Table of Contents
- CSS = 'css'
- CSS Asset Type
- JAVASCRIPT = 'javascript'
- JavaScript Asset Type
- TRANSLATION = 'translation'
- JavaScript Translation
- $path : string
- $type : string
- __construct() : mixed
- Initializes the asset.
- __toString() : string
- Get asset HTML markup.
- getPath() : string
- Get the path of the asset.
- getType() : string
- Get the type of the asset.
Constants
CSS
CSS Asset Type
public
mixed
CSS
= 'css'
JAVASCRIPT
JavaScript Asset Type
public
mixed
JAVASCRIPT
= 'javascript'
TRANSLATION
JavaScript Translation
public
mixed
TRANSLATION
= 'translation'
Properties
$path
protected
string
$path
$type
protected
string
$type
Methods
__construct()
Initializes the asset.
public
__construct(string $path) : mixed
Parameters
- $path : string
-
Relative path to the asset file (relative to the "src" directory). Provide only the filename for translations (no path is required - e.g. general.lang.inc.php).
Tags
Return values
mixed —__toString()
Get asset HTML markup.
public
__toString() : string
Return values
string —Returns the HTML markup that will load the file when the page is loaded.
getPath()
Get the path of the asset.
public
getPath() : string
Return values
string —getType()
Get the type of the asset.
public
getType() : string