CssLocalizedAsset
class CssLocalizedAsset extends CssAsset (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 CssAsset | |
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 |
protected string | $assetMedia | The default media of this asset. |
from CssAsset |
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)?
Get the URL of this asset.
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
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 184
setAssetSupportsMinification(bool $minify)
Does this asset support minification?
in
Asset at line 194
bool
assetSupportsMinification()
Does this asset support minification?
in
Asset at line 204
setAssetSupportsCombination(bool $combine)
Can this asset be combined with other assets?
in
Asset at line 214
bool
assetSupportsCombination()
Can this asset be combined with other assets?
in
Asset at line 224
setAssetLocation(string $location)
Set the location of this asset.
in
Asset at line 234
setAssetURL(string $url)
Set the URL of this asset.
string
getAssetURL()
Get the URL of this asset.
in
Asset at line 274
setAssetPath(string $path)
Set the path to this asset.
in
Asset at line 285
string
getAssetPath()
Get the path to this asset.
in
Asset at line 299
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 320
bool
hasAssetBeenMapped()
Does the URL/path have already been resolved (starting from the location) for this (local) assets?
in
Asset at line 330
string
getAssetURLPath()
Get the path of the parent "folder" that contains this asset.
in
Asset at line 340
string
getAssetFilename()
Get the name of the file of this asset.
string
getAssetHashKey()
No description
in
Asset at line 386
setAssetVersion(string $version)
Set the version of this asset.
in
Asset at line 396
string
getAssetVersion()
Get the version of this asset.
in
Asset at line 406
setPackageObject(Package|Package|null|false $pkg)
Set the package that defines this asset.
string|null
getAssetContents()
No description
in
Asset at line 428
setCombinedAssetSourceFiles(string[] $paths)
Set the URL of the source files this asset has been built from (useful to understand the origin of this asset).
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 485
AssetPointer
getAssetPointer()
Get an AssetPointer instance that identifies this asset.
in
Asset at line 499
static protected string|null
getAssetContentsByRoute(string $route)
Get the contents of an asset given its route.
in
Asset at line 551
protected string
obfuscateNoCacheValue(string $noCacheValue)
Obfuscate the value of the query-string parameter used to avoid browser cache problems.
string
getAssetDefaultPosition()
No description
string
getAssetType()
No description
setAssetMedia(string $assetMedia)
Set the media of this asset.
string
getAssetMedia()
Get the media of this asset.
static protected string
getRelativeOutputDirectory()
No description
static protected bool|string
getOutputDirectory()
No description
static string
changePaths(string $content, string $current_path, string $target_path)
No description
string
__toString()
No description