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

__construct(string $assetHandle = '')

Initialize the instance.

from Asset
setAssetPosition(string $position)

Set the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).

from Asset
string
getAssetPosition()

Get the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).

from Asset
string
getAssetHandle()

Get the handle of this asset (together with getAssetType, identifies this asset).

from 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).

setAssetIsLocal(bool $isLocal)

Is this asset a locally available file (accessible with the getAssetPath method)?

from Asset
bool
isAssetLocal()

Is this asset a locally available file (accessible with the getAssetPath method)?

setAssetSupportsMinification(bool $minify)

Does this asset support minification?

from Asset
bool
assetSupportsMinification()

Does this asset support minification?

from Asset
setAssetSupportsCombination(bool $combine)

Can this asset be combined with other assets?

from Asset
bool
assetSupportsCombination()

Can this asset be combined with other assets?

from Asset
setAssetLocation(string $location)

Set the location of this asset.

from Asset
setAssetURL(string $url)

Set the URL of this asset.

from Asset
string
getAssetURL()

Get the URL of this asset.

setAssetPath(string $path)

Set the path to this asset.

from Asset
string
getAssetPath()

Get the path to this asset.

from 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.

from Asset
bool
hasAssetBeenMapped()

Does the URL/path have already been resolved (starting from the location) for this (local) assets?

from Asset
string
getAssetURLPath()

Get the path of the parent "folder" that contains this asset.

from Asset
string
getAssetFilename()

Get the name of the file of this asset.

from Asset
string
getAssetHashKey()

No description

setAssetVersion(string $version)

Set the version of this asset.

from Asset
string
getAssetVersion()

Get the version of this asset.

from Asset
setPackageObject(Package|Package|null|false $pkg)

Set the package that defines this asset.

from Asset
string|null
getAssetContents()

No description

setCombinedAssetSourceFiles(string[] $paths)

Set the URL of the source files this asset has been built from (useful to understand the origin of this asset).

from Asset
register(string $filename, array $args, Package|Package|string|null|false $pkg = false)

Register the asset properties.

from CssAsset
static AssetInterface[]
process(AssetInterface[] $assets)

No description

from CssAsset
getAssetPointer()

Get an AssetPointer instance that identifies this asset.

from Asset
static string|null
getAssetContentsByRoute(string $route)

Get the contents of an asset given its route.

from Asset
string
getAssetDefaultPosition()

No description

from CssAsset
string
getAssetType()

No description

setAssetMedia(string $assetMedia)

Set the media of this asset.

from CssAsset
string
getAssetMedia()

Get the media of this asset.

from CssAsset
static string
getRelativeOutputDirectory()

No description

from CssAsset
static bool|string
getOutputDirectory()

No description

from CssAsset
static string
changePaths(string $content, string $current_path, string $target_path)

No description

from CssAsset
string
__toString()

No description

from CssAsset

Details

__construct(string $assetHandle = '')

Initialize the instance.

Parameters

string $assetHandle the handle of this asset (together with getAssetType, identifies this asset)

setAssetPosition(string $position)

Set the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).

Parameters

string $position

See also

\Concrete\Core\Asset\AssetInterface::setAssetPosition()

string getAssetPosition()

Get the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).

Return Value

string

See also

\Concrete\Core\Asset\AssetInterface::getAssetPosition()

string getAssetHandle()

Get the handle of this asset (together with getAssetType, identifies this asset).

Return Value

string

See also

\Concrete\Core\Asset\AssetInterface::getAssetHandle()

string getOutputAssetType()

Get the resulting type of the asset (\Concrete\Core\Asset\AssetInterface::OUTPUTASSETTYPE_CSS, \Concrete\Core\Asset\AssetInterface::OUTPUTASSETTYPE_JAVASCRIPT or other values).

Return Value

string

setAssetIsLocal(bool $isLocal)

Is this asset a locally available file (accessible with the getAssetPath method)?

Parameters

bool $isLocal

See also

\Concrete\Core\Asset\AssetInterface::setAssetIsLocal()

bool isAssetLocal()

Is this asset a locally available file (accessible with the getAssetPath method)?

Return Value

bool

setAssetSupportsMinification(bool $minify)

Does this asset support minification?

Parameters

bool $minify

See also

\Concrete\Core\Asset\AssetInterface::setAssetSupportsMinification()

bool assetSupportsMinification()

Does this asset support minification?

Return Value

bool

See also

\Concrete\Core\Asset\AssetInterface::assetSupportsMinification()

setAssetSupportsCombination(bool $combine)

Can this asset be combined with other assets?

Parameters

bool $combine

See also

\Concrete\Core\Asset\AssetInterface::setAssetSupportsCombination()

bool assetSupportsCombination()

Can this asset be combined with other assets?

Return Value

bool

See also

\Concrete\Core\Asset\AssetInterface::assetSupportsCombination()

setAssetLocation(string $location)

Set the location of this asset.

Parameters

string $location

setAssetURL(string $url)

Set the URL of this asset.

Parameters

string $url

See also

\Concrete\Core\Asset\AssetInterface::setAssetURL()

string getAssetURL()

Get the URL of this asset.

Return Value

string

setAssetPath(string $path)

Set the path to this asset.

Parameters

string $path

See also

\Concrete\Core\Asset\AssetInterface::setAssetPath()

string getAssetPath()

Get the path to this asset.

Return Value

string

See also

\Concrete\Core\Asset\AssetInterface::getAssetPath()

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.

Parameters

string $path

See also

\Concrete\Core\Asset\AssetInterface::mapAssetLocation()

bool hasAssetBeenMapped()

Does the URL/path have already been resolved (starting from the location) for this (local) assets?

Return Value

bool

string getAssetURLPath()

Get the path of the parent "folder" that contains this asset.

Return Value

string

See also

\Concrete\Core\Asset\AssetInterface::getAssetURLPath()

string getAssetFilename()

Get the name of the file of this asset.

Return Value

string

See also

\Concrete\Core\Asset\AssetInterface::getAssetFilename()

string getAssetHashKey()

Return Value

string

setAssetVersion(string $version)

Set the version of this asset.

Parameters

string $version

See also

\Concrete\Core\Asset\AssetInterface::setAssetVersion()

string getAssetVersion()

Get the version of this asset.

Return Value

string

See also

\Concrete\Core\Asset\AssetInterface::getAssetVersion()

setPackageObject(Package|Package|null|false $pkg)

Set the package that defines this asset.

Parameters

Package|Package|null|false $pkg

See also

\Concrete\Core\Asset\AssetInterface::setPackageObject()

string|null getAssetContents()

Return Value

string|null

setCombinedAssetSourceFiles(string[] $paths)

Set the URL of the source files this asset has been built from (useful to understand the origin of this asset).

Parameters

string[] $paths

See also

\Concrete\Core\Asset\AssetInterface::setCombinedAssetSourceFiles()

register(string $filename, array $args, Package|Package|string|null|false $pkg = false)

Register the asset properties.

Parameters

string $filename the location of the asset
array $args {

@var bool $local is this asset a locally available file (accessible with the getAssetPath method)?
@var bool $minify does this asset support minification?
@var bool $combine can this asset be combined with other assets?
@var string $version the version of this asset
@var string $position the position of this asset (\Concrete\Core\Asset\AssetInterface::ASSET_POSITION_HEADER or \Concrete\Core\Asset\AssetInterface::ASSET_POSITION_FOOTER).

}

Package|Package|string|null|false $pkg the package that defines this asset (or its handle)

See also

\Concrete\Core\Asset\AssetInterface::register()

static AssetInterface[] process(AssetInterface[] $assets)

Parameters

AssetInterface[] $assets The original assets

Return Value

AssetInterface[] The final assets

AssetPointer getAssetPointer()

Get an AssetPointer instance that identifies this asset.

Return Value

AssetPointer

static protected string|null getAssetContentsByRoute(string $route)

Get the contents of an asset given its route.

Parameters

string $route

Return Value

string|null

string getAssetDefaultPosition()

Return Value

string

string getAssetType()

Return Value

string

setAssetMedia(string $assetMedia)

Set the media of this asset.

Parameters

string $assetMedia

string getAssetMedia()

Get the media of this asset.

Return Value

string

static protected string getRelativeOutputDirectory()

Return Value

string

static protected bool|string getOutputDirectory()

Return Value

bool|string

static string changePaths(string $content, string $current_path, string $target_path)

Parameters

string $content
string $current_path
string $target_path

Return Value

string

string __toString()

Return Value

string