FileAccess Orion

AssetsHelper extends Helper
in package

AssetsHelper helps manage asset URLs.

Tags
author

Fabien Potencier fabien@symfony.com

deprecated

since version 4.3, to be removed in 5.0; use Twig instead.

Table of Contents

$packages  : mixed
__construct()  : mixed
getName()  : mixed
{@inheritdoc}
getUrl()  : string
Returns the public url/path of an asset.
getVersion()  : string
Returns the version of an asset.

Properties

Methods

__construct()

public __construct(Packages $packages) : mixed
Parameters
$packages : Packages
Return values
mixed

getName()

{@inheritdoc}

public getName() : mixed
Return values
mixed

getUrl()

Returns the public url/path of an asset.

public getUrl(string $path[, string $packageName = null ]) : string

If the package used to generate the path is an instance of UrlPackage, you will always get a URL and not a path.

Parameters
$path : string

A public path

$packageName : string = null

The name of the asset package to use

Return values
string

The public path of the asset

getVersion()

Returns the version of an asset.

public getVersion(string $path[, string $packageName = null ]) : string
Parameters
$path : string

A public path

$packageName : string = null

The name of the asset package to use

Return values
string

The asset version

Search results