class Urls (View source)

\@package Helpers

Methods

string
getPackageIconURL(Package $pkg)

Gets a full URL to an icon for a particular application.

mixed
getPackageURL(Package $pkg)

Get the package's URL.

string
getBlockTypeIconURL(BlockType $bt)

Gets a full URL to an icon for a particular block type.

string
getBlockTypeAssetsURL(BlockType $bt, bool|string $file = false)

Gets a full URL to the directory containing all of a block's items, including JavaScript, tools, icons, etc.

string
getBlockTypeJavaScriptURL(BlockType $bt)

Get the URL of the "auto.js" file of a block type, to be loaded when adding/editing a block.

string
getBlockTypeCssURL(BlockType $bt)

Get the URL of the "auto.css" file of a block type, to be loaded when adding/editing a block.

Details

string getPackageIconURL(Package $pkg)

Gets a full URL to an icon for a particular application.

Parameters

Package $pkg

Return Value

string

URL to the package's icon

mixed getPackageURL(Package $pkg)

Get the package's URL.

Parameters

Package $pkg

Return Value

mixed

string getBlockTypeIconURL(BlockType $bt)

Gets a full URL to an icon for a particular block type.

Parameters

BlockType $bt

Return Value

string

string getBlockTypeAssetsURL(BlockType $bt, bool|string $file = false)

Gets a full URL to the directory containing all of a block's items, including JavaScript, tools, icons, etc.

..

Parameters

BlockType $bt
bool|string $file

If provided will get the assets url for a file in a block

Return Value

string

$url

string getBlockTypeJavaScriptURL(BlockType $bt)

Get the URL of the "auto.js" file of a block type, to be loaded when adding/editing a block.

Parameters

BlockType $bt

Return Value

string

$url Empty string if the auto.js file doesn't exist

string getBlockTypeCssURL(BlockType $bt)

Since: concrete5 8.5.0a3

Get the URL of the "auto.css" file of a block type, to be loaded when adding/editing a block.

Parameters

BlockType $bt

Return Value

string

$url Empty string if the auto.css file doesn't exist