AssetUrl

View helper for returning a path to an asset.
extends Zend\View\Helper\AbstractHelper
Methods Summary
public
# __construct( \Theme|null $currentTheme , array $modules , $externals )
Construct the helper.
public
# __invoke( string $file , string|null $module = NULL, bool $override = false )
Return a path to an asset. Returns the asset URL for the current theme if no module specified. Otherwise, the url depends on whether an override is allowed or not. - If an override is allowed and if the module is set and active, returns the asset URL for the current theme if the file exists, else returns the asset URL for the specified module (without checking if the asset file exists in it, because it’s a prerequisite). If the module is disabled, returns null. - If it is not allowed, returns the asset URL for the specified module, only if the module is active. Does not check if the asset file exists. In all cases, if the module is set and if the file is marked as external, the external url will be returned by priority, without any check.
Methods inherited from Zend\View\Helper\AbstractHelper
setView(), getView()
Constants Summary
public string OMEKA_ASSETS_PATH
# '%s/application/asset/%s'
public string MODULE_ASSETS_PATH
# '%s/modules/%s/asset/%s'
public string THEME_ASSETS_PATH
# '%s/themes/%s/asset/%s'
Properties Summary
protected Omeka\View\Helper\Theme $currentTheme
# NULL
protected array $activeModules
# NULL
protected array $externals
# NULL
Properties inherited from Zend\View\Helper\AbstractHelper
$view