PHP 인터페이스 Themosis\Asset\IAsset

파일 보기 프로젝트 열기: themosis/framework

공개 메소드들

메소드 설명
addAttributes ( array $atts ) : Asset Add attributes to the asset opening tag.
isQueued ( ) : boolean Tells if an asset is queued or not.
localize ( string $objectName, mixed $data ) : Asset Localize data for the linked asset.
remove ( ) : Asset Remove a declared asset.
to ( string $area ) : Asset Allow the developer to define where to load the asset.

메소드 상세

addAttributes() 공개 메소드

Add attributes to the asset opening tag.
public addAttributes ( array $atts ) : Asset
$atts array The asset attributes to add.
리턴 Asset

isQueued() 공개 메소드

Tells if an asset is queued or not.
public isQueued ( ) : boolean
리턴 boolean

localize() 공개 메소드

Output JS object right before the script output.
public localize ( string $objectName, mixed $data ) : Asset
$objectName string The name of the JS variable that will hold the data.
$data mixed Any data to attach to the JS variable: string, boolean, object, array, ...
리턴 Asset

remove() 공개 메소드

Remove a declared asset.
public remove ( ) : Asset
리턴 Asset

to() 공개 메소드

Only 'admin', 'login' and 'customizer' are accepted. If none of those values are used, simply keep the default front-end area.
public to ( string $area ) : Asset
$area string Specify where to load the asset: 'admin', 'login' or 'customizer'.
리턴 Asset