Asset
in package
FinalYes
Tags
Table of Contents
Properties
Methods
- __toString() : mixed
- async() : self
- defer() : self
- fromEasyAdminAssetPackage() : self
- Assets provided by EasyAdmin (e.g. 'bundles/easyadmin/app.js') are versioned and managed through a special Symfony Asset named package.
- getAsDto() : AssetDto
- htmlAttr() : self
- htmlAttrs() : self
- ignoreOnDetail() : self
- ignoreOnForm() : self
- ignoreOnIndex() : self
- ignoreWhenCreating() : self
- ignoreWhenUpdating() : self
- new() : self
- nopush() : self
- onlyOnDetail() : self
- onlyOnForms() : self
- onlyOnIndex() : self
- onlyWhenCreating() : self
- onlyWhenUpdating() : self
- package() : self
- preload() : self
- webpackEntrypointName() : self
- webpackPackageName() : self
- __construct() : mixed
Properties
$dto
private
AssetDto
$dto
Methods
__toString()
public
__toString() : mixed
async()
public
async([bool $async = true ]) : self
Parameters
- $async : bool = true
Return values
selfdefer()
public
defer([bool $defer = true ]) : self
Parameters
- $defer : bool = true
Return values
selffromEasyAdminAssetPackage()
Assets provided by EasyAdmin (e.g. 'bundles/easyadmin/app.js') are versioned and managed through a special Symfony Asset named package.
public
static fromEasyAdminAssetPackage(string $value) : self
Call this method instead of '::new()' when adding those EasyAdmin assets so they use the right package name (which is needed later when calling to 'asset()' Twig function).
Parameters
- $value : string
-
The 'path' when adding CSS or JS files and the 'entryName' when adding Webpack Encore entries
Return values
selfgetAsDto()
public
getAsDto() : AssetDto
Return values
AssetDtohtmlAttr()
public
htmlAttr(string $attrName, string $attrValue) : self
Parameters
- $attrName : string
- $attrValue : string
Return values
selfhtmlAttrs()
public
htmlAttrs(array<string|int, mixed> $attrNamesAndValues) : self
Parameters
- $attrNamesAndValues : array<string|int, mixed>
Return values
selfignoreOnDetail()
public
ignoreOnDetail() : self
Return values
selfignoreOnForm()
public
ignoreOnForm() : self
Return values
selfignoreOnIndex()
public
ignoreOnIndex() : self
Return values
selfignoreWhenCreating()
public
ignoreWhenCreating() : self
Return values
selfignoreWhenUpdating()
public
ignoreWhenUpdating() : self
Return values
selfnew()
public
static new(string $value) : self
Parameters
- $value : string
-
The 'path' when adding CSS or JS files and the 'entryName' when adding Webpack Encore entries
Return values
selfnopush()
public
nopush([bool $nopush = true ]) : self
Parameters
- $nopush : bool = true
Return values
selfonlyOnDetail()
public
onlyOnDetail() : self
Return values
selfonlyOnForms()
public
onlyOnForms() : self
Return values
selfonlyOnIndex()
public
onlyOnIndex() : self
Return values
selfonlyWhenCreating()
public
onlyWhenCreating() : self
Return values
selfonlyWhenUpdating()
public
onlyWhenUpdating() : self
Return values
selfpackage()
public
package(string $packageName) : self
Parameters
- $packageName : string
-
The name of the Symfony Asset package this asset belongs to
Return values
selfpreload()
public
preload([bool $preload = true ]) : self
Parameters
- $preload : bool = true
Return values
selfwebpackEntrypointName()
public
webpackEntrypointName(string $entrypointName) : self
Parameters
- $entrypointName : string
Return values
selfwebpackPackageName()
public
webpackPackageName([string|null $packageName = null ]) : self
Parameters
- $packageName : string|null = null
Return values
self__construct()
private
__construct(AssetDto $assetDto) : mixed
Parameters
- $assetDto : AssetDto