Documentation

AssetPackage
in package
implements PackageInterface

FinalYes

This defines a Symfony Asset named package that groups all the assets provided by EasyAdmin. This is needed because EasyAdmin uses asset versioning, so the full absolute URLs of assets isn't known (the URL contain changing hashes).

In practice this uses the same strategy (and even the same "manifest.json" file) used by Webpack Encore. We do this because we want to keep EasyAdmin dependencies as lean as possible, so we don't want to require Webpack Encore to use EasyAdmin.

Table of Contents

Interfaces

PackageInterface
Asset package interface.

Constants

PACKAGE_NAME  = 'easyadmin.assets.package'

Properties

$package  : PackageInterface

Methods

__construct()  : mixed
getUrl()  : string
Returns an absolute or root-relative public path.
getVersion()  : string
Returns the asset version for an asset.

Constants

PACKAGE_NAME

public mixed PACKAGE_NAME = 'easyadmin.assets.package'

Properties

Methods

getUrl()

Returns an absolute or root-relative public path.

public getUrl(string $assetPath) : string
Parameters
$assetPath : string
Return values
string

getVersion()

Returns the asset version for an asset.

public getVersion(string $assetPath) : string
Parameters
$assetPath : string
Return values
string

        
On this page

Search results