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.
Obfuscate the value of the query-string parameter used to avoid browser cache problems.
No description
Details
in
Asset at line 113
__construct(string $assetHandle = '')
Initialize the instance.
in
Asset at line 124
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 134
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 144
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 164
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 182
setAssetSupportsMinification(bool $minify)
Does this asset support minification?
in
Asset at line 192
bool
assetSupportsMinification()
Does this asset support minification?
in
Asset at line 202
setAssetSupportsCombination(bool $combine)
Can this asset be combined with other assets?
in
Asset at line 212
bool
assetSupportsCombination()
Can this asset be combined with other assets?
in
Asset at line 222
setAssetLocation(string $location)
Set the location of this asset.
in
Asset at line 232
setAssetURL(string $url)
Set the URL of this asset.
in
Asset at line 243
string
getAssetURL()
Get the URL of this asset.
in
Asset at line 272
setAssetPath(string $path)
Set the path to this asset.
in
Asset at line 283
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 318
bool
hasAssetBeenMapped()
Does the URL/path have already been resolved (starting from the location) for this (local) assets?
in
Asset at line 328
string
getAssetURLPath()
Get the path of the parent "folder" that contains this asset.
in
Asset at line 338
string
getAssetFilename()
Get the name of the file of this asset.
string
getAssetHashKey()
No description
in
Asset at line 384
setAssetVersion(string $version)
Set the version of this asset.
in
Asset at line 394
string
getAssetVersion()
Get the version of this asset.
in
Asset at line 404
setPackageObject(Package|Package|null|false $pkg)
Set the package that defines this asset.
string|null
getAssetContents()
No description
in
Asset at line 426
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 436
register(string $filename, array $args, Package|Package|string|null|false $pkg = false)
Register the asset properties.
static AssetInterface[]
process(AssetInterface[] $assets)
No description
in
Asset at line 483
AssetPointer
getAssetPointer()
Get an AssetPointer instance that identifies this asset.
in
Asset at line 497
static protected string|null
getAssetContentsByRoute(string $route)
Get the contents of an asset given its route.
in
Asset at line 549
protected string
obfuscateNoCacheValue(string $noCacheValue)
Obfuscate the value of the query-string parameter used to avoid browser cache problems.
string
getAssetDefaultPosition()
No description
static string
getRelativeOutputDirectory()
No description
static protected bool|string
getOutputDirectory()
No description
string
getAssetType()
No description
string
__toString()
No description