JavascriptLocalizedAsset
class JavascriptLocalizedAsset extends JavascriptAsset (View source)
Properties
protected string | $assetHandle | The handle of this asset (together with getAssetType, identifies this asset). |
from Asset |
protected string | $position | The position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER). |
from Asset |
protected bool | $local | Is this asset a locally available file (accessible with the getAssetPath method)? |
from Asset |
protected bool | $assetSupportsMinification | ||
protected bool | $assetSupportsCombination | from JavascriptAsset | |
protected string | $location | The location of the asset (used to build the path & URL). |
from Asset |
protected string | $assetURL | The URL of this asset. |
from Asset |
protected string | $assetPath | The path to this asset. |
from Asset |
protected bool | $assetHasBeenMapped | Does the URL/path have already been resolved (starting from the location) for this (local) assets? |
from Asset |
protected string | $filename | The name of the file of this asset. |
from Asset |
protected string | $assetVersion | The asset version. |
from Asset |
protected Package|Package|null | $pkg | The package that defines this asset. |
from Asset |
protected array | $combinedAssetSourceFiles | The URL of the source files this asset has been built from (useful to understand the origin of this asset). |
from Asset |
Methods
Set the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).
Get the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).
Get the handle of this asset (together with getAssetType, identifies this asset).
Get the resulting type of the asset (\Concrete\Core\Asset\AssetInterface::OUTPUTASSETTYPE_CSS, \Concrete\Core\Asset\AssetInterface::OUTPUTASSETTYPE_JAVASCRIPT or other values).
Is this asset a locally available file (accessible with the getAssetPath method)?
Is this asset a locally available file (accessible with the getAssetPath method)?
If the asset is local, set its path and URL starting from the relative path. If it's not local, set its URL.
Does the URL/path have already been resolved (starting from the location) for this (local) assets?
No description
No description
Set the URL of the source files this asset has been built from (useful to understand the origin of this asset).
Register the asset properties.
Get the contents of an asset given its route.
Get the default asset position (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).
No description
Details
in
Asset at line 114
__construct(string $assetHandle = '')
Initialize the instance.
in
Asset at line 125
setAssetPosition(string $position)
Set the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).
in
Asset at line 135
string
getAssetPosition()
Get the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).
in
Asset at line 145
string
getAssetHandle()
Get the handle of this asset (together with getAssetType, identifies this asset).
string
getOutputAssetType()
Get the resulting type of the asset (\Concrete\Core\Asset\AssetInterface::OUTPUTASSETTYPE_CSS, \Concrete\Core\Asset\AssetInterface::OUTPUTASSETTYPE_JAVASCRIPT or other values).
in
Asset at line 165
setAssetIsLocal(bool $isLocal)
Is this asset a locally available file (accessible with the getAssetPath method)?
bool
isAssetLocal()
Is this asset a locally available file (accessible with the getAssetPath method)?
in
Asset at line 185
setAssetSupportsMinification(bool $minify)
Does this asset support minification?
in
Asset at line 195
bool
assetSupportsMinification()
Does this asset support minification?
in
Asset at line 205
setAssetSupportsCombination(bool $combine)
Can this asset be combined with other assets?
in
Asset at line 215
bool
assetSupportsCombination()
Can this asset be combined with other assets?
in
Asset at line 225
setAssetLocation(string $location)
Set the location of this asset.
in
Asset at line 235
setAssetURL(string $url)
Set the URL of this asset.
in
Asset at line 246
string
getAssetURL()
Get the URL of this asset.
in
Asset at line 260
setAssetPath(string $path)
Set the path to this asset.
in
Asset at line 271
string
getAssetPath()
Get the path to this asset.
mapAssetLocation(string $path)
If the asset is local, set its path and URL starting from the relative path. If it's not local, set its URL.
in
Asset at line 306
bool
hasAssetBeenMapped()
Does the URL/path have already been resolved (starting from the location) for this (local) assets?
in
Asset at line 316
string
getAssetURLPath()
Get the path of the parent "folder" that contains this asset.
in
Asset at line 326
string
getAssetFilename()
Get the name of the file of this asset.
string
getAssetHashKey()
No description
in
Asset at line 372
setAssetVersion(string $version)
Set the version of this asset.
in
Asset at line 382
string
getAssetVersion()
Get the version of this asset.
in
Asset at line 392
setPackageObject(Package|Package|null|false $pkg)
Set the package that defines this asset.
string|null
getAssetContents()
No description
in
Asset at line 414
setCombinedAssetSourceFiles(string[] $paths)
Set the URL of the source files this asset has been built from (useful to understand the origin of this asset).
in
Asset at line 424
register(string $filename, array $args, Package|Package|string|null|false $pkg = false)
Register the asset properties.
static AssetInterface[]
process(AssetInterface[] $assets)
Asset-type specific post-processing.
in
Asset at line 471
AssetPointer
getAssetPointer()
Get an AssetPointer instance that identifies this asset.
in
Asset at line 485
static protected string|null
getAssetContentsByRoute(string $route)
Get the contents of an asset given its route.
string
getAssetDefaultPosition()
Get the default asset position (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).
static string
getRelativeOutputDirectory()
No description
static protected bool|string
getOutputDirectory()
No description
string
getAssetType()
No description
string
__toString()
Render the HTML tag that will load this asset.