PHP 클래스 FluidTYPO3\Vhs\Asset

Class to create Assets in PHP. ### Examples: $asset = $this->objectManager->get('FluidTYPO3\\Vhs\\Asset'); OR you can use the static factory method which works anywhere including outside of Extbase. $asset = \FluidTYPO3\Vhs\Asset::getInstance(); $asset->setPath('fileadmin/test.js')->setStandalone(TRUE)->finalize(); Or simply: $this->objectManager->get('FluidTYPO3\\Vhs\\Asset')->setPath('...')->finalize(); And you can create clean instances: Depending on how you need to access the Asset afterwards, you will want wo switch between these methods. Or if you have all settings in an array (with members named according to the properties on this class: \FluidTYPO3\Vhs\Asset::createFromSettings($settings)->finalize(); Finally, if your Asset is file based, VHS can perform a few detections to set initial attributes like standalone, external (if file contains protocol), type (based on extension) and name (base name of file). \FluidTYPO3\Vhs\Asset::createFromFile($filePathAndFilename); \FluidTYPO3\Vhs\Asset::createFromUrl($urlToExternalFile); You can chain all setters on the class before finally calling finalize() to register the Asset (you can still modify the Asset afterwards, but an Asset that has not been finalize()'ed will never show up or be processed - which is a lot friendlier than requiring you to use remove() on unwanted Assets). > Note: the "createFrom..." suite of methods automatically calls finalize() > on your Asset just before returning it. You can of course keep modifying > the instance after it is returned - but when using a "createFrom"... method > VHS assumes you always want your Asset included in the output.
상속: implements FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface
파일 보기 프로젝트 열기: fluidtypo3/vhs 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$configurationManager TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
$content string
$dependencies array
$external boolean
$fluid boolean
$movable boolean
$name string
$namedChunks boolean
$path string
$removed boolean
$rewrite boolean
$settings array
$standalone boolean
$type string
$variables array

공개 메소드들

메소드 설명
assertAddNameCommentWithChunk ( ) : boolean Returns TRUE if settings specify that the name of each Asset should be placed above the built content when placed in merged Asset cache files.
assertAllowedInFooter ( ) : boolean
assertDebugEnabled ( ) : boolean Returns TRUE if the current Asset should be debugged as commanded by settings in TypoScript an/ord ViewHelper attributes.
assertFluidEnabled ( ) : boolean Returns TRUE of settings specify that the source of this Asset should be rendered as if it were a Fluid template, using variables from the "arguments" attribute
assertHasBeenRemoved ( ) : boolean
build ( ) : mixed Build this asset. Override this method in the specific implementation of an Asset in order to:
createFromContent ( string $content ) : Asset
createFromFile ( string $filePathAndFilename ) : Asset
createFromSettings ( array $settings ) : Asset
createFromUrl ( string $url ) : Asset
finalize ( ) : Asset
getAssetSettings ( ) : array
getContent ( ) : string
getDebugInformation ( ) : array Allows public access to debug this particular Asset instance later, when including the Asset in the page.
getDependencies ( ) : array
getExternal ( ) : boolean
getFluid ( ) : boolean
getInstance ( ) : Asset
getMovable ( ) : boolean
getName ( ) : string
getNamedChunks ( ) : boolean
getPath ( ) : string
getRemoved ( ) : boolean
getRewrite ( ) : boolean
getSettings ( ) : array Returns the settings used by this particular Asset during inclusion. Public access allows later inspection of the TypoScript values which were applied to the Asset.
getStandalone ( ) : boolean
getType ( ) : string
getVariables ( ) : array
injectConfigurationManager ( TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager ) : void
remove ( ) : Asset
render ( ) : mixed Render method
setContent ( string $content ) : Asset
setDependencies ( array $dependencies ) : Asset
setExternal ( boolean $external ) : Asset
setFluid ( boolean $fluid ) : Asset
setMovable ( boolean $movable )
setName ( string $name ) : Asset
setNamedChunks ( boolean $namedChunks ) : Asset
setPath ( string $path ) : Asset
setRemoved ( boolean $removed ) : Asset
setRewrite ( boolean $rewrite ) : Asset
setSettings ( array $settings ) : Asset
setStandalone ( boolean $standalone ) : Asset
setType ( string $type ) : Asset
setVariables ( array $variables ) : Asset

메소드 상세

assertAddNameCommentWithChunk() 공개 메소드

Returns TRUE if settings specify that the name of each Asset should be placed above the built content when placed in merged Asset cache files.

assertAllowedInFooter() 공개 메소드

public assertAllowedInFooter ( ) : boolean
리턴 boolean

assertDebugEnabled() 공개 메소드

Returns TRUE if the current Asset should be debugged as commanded by settings in TypoScript an/ord ViewHelper attributes.
public assertDebugEnabled ( ) : boolean
리턴 boolean

assertFluidEnabled() 공개 메소드

Returns TRUE of settings specify that the source of this Asset should be rendered as if it were a Fluid template, using variables from the "arguments" attribute
public assertFluidEnabled ( ) : boolean
리턴 boolean

assertHasBeenRemoved() 공개 메소드

public assertHasBeenRemoved ( ) : boolean
리턴 boolean

build() 공개 메소드

- if necessary compile the Asset (LESS, SASS, CoffeeScript etc) - make a final rendering decision based on arguments Note that within this function the ViewHelper and TemplateVariable Containers are not dependable, you cannot use the ControllerContext and RenderingContext and you should therefore also never call renderChildren from within this function. Anything else goes; CLI commands to build, caching implementations - you name it.
public build ( ) : mixed
리턴 mixed

createFromContent() 공개 정적인 메소드

public static createFromContent ( string $content ) : Asset
$content string
리턴 Asset

createFromFile() 공개 정적인 메소드

public static createFromFile ( string $filePathAndFilename ) : Asset
$filePathAndFilename string
리턴 Asset

createFromSettings() 공개 정적인 메소드

public static createFromSettings ( array $settings ) : Asset
$settings array
리턴 Asset

createFromUrl() 공개 정적인 메소드

public static createFromUrl ( string $url ) : Asset
$url string
리턴 Asset

finalize() 공개 메소드

public finalize ( ) : Asset
리턴 Asset

getAssetSettings() 공개 메소드

public getAssetSettings ( ) : array
리턴 array

getContent() 공개 메소드

public getContent ( ) : string
리턴 string

getDebugInformation() 공개 메소드

Allows public access to debug this particular Asset instance later, when including the Asset in the page.
public getDebugInformation ( ) : array
리턴 array

getDependencies() 공개 메소드

public getDependencies ( ) : array
리턴 array

getExternal() 공개 메소드

public getExternal ( ) : boolean
리턴 boolean

getFluid() 공개 메소드

public getFluid ( ) : boolean
리턴 boolean

getInstance() 공개 정적인 메소드

public static getInstance ( ) : Asset
리턴 Asset

getMovable() 공개 메소드

public getMovable ( ) : boolean
리턴 boolean

getName() 공개 메소드

public getName ( ) : string
리턴 string

getNamedChunks() 공개 메소드

public getNamedChunks ( ) : boolean
리턴 boolean

getPath() 공개 메소드

public getPath ( ) : string
리턴 string

getRemoved() 공개 메소드

public getRemoved ( ) : boolean
리턴 boolean

getRewrite() 공개 메소드

public getRewrite ( ) : boolean
리턴 boolean

getSettings() 공개 메소드

Returns the settings used by this particular Asset during inclusion. Public access allows later inspection of the TypoScript values which were applied to the Asset.
public getSettings ( ) : array
리턴 array

getStandalone() 공개 메소드

public getStandalone ( ) : boolean
리턴 boolean

getType() 공개 메소드

public getType ( ) : string
리턴 string

getVariables() 공개 메소드

public getVariables ( ) : array
리턴 array

injectConfigurationManager() 공개 메소드

public injectConfigurationManager ( TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager ) : void
$configurationManager TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
리턴 void

remove() 공개 메소드

public remove ( ) : Asset
리턴 Asset

render() 공개 메소드

Render method
public render ( ) : mixed
리턴 mixed

setContent() 공개 메소드

public setContent ( string $content ) : Asset
$content string
리턴 Asset

setDependencies() 공개 메소드

public setDependencies ( array $dependencies ) : Asset
$dependencies array
리턴 Asset

setExternal() 공개 메소드

public setExternal ( boolean $external ) : Asset
$external boolean
리턴 Asset

setFluid() 공개 메소드

public setFluid ( boolean $fluid ) : Asset
$fluid boolean
리턴 Asset

setMovable() 공개 메소드

public setMovable ( boolean $movable )
$movable boolean

setName() 공개 메소드

public setName ( string $name ) : Asset
$name string
리턴 Asset

setNamedChunks() 공개 메소드

public setNamedChunks ( boolean $namedChunks ) : Asset
$namedChunks boolean
리턴 Asset

setPath() 공개 메소드

public setPath ( string $path ) : Asset
$path string
리턴 Asset

setRemoved() 공개 메소드

public setRemoved ( boolean $removed ) : Asset
$removed boolean
리턴 Asset

setRewrite() 공개 메소드

public setRewrite ( boolean $rewrite ) : Asset
$rewrite boolean
리턴 Asset

setSettings() 공개 메소드

public setSettings ( array $settings ) : Asset
$settings array
리턴 Asset

setStandalone() 공개 메소드

public setStandalone ( boolean $standalone ) : Asset
$standalone boolean
리턴 Asset

setType() 공개 메소드

public setType ( string $type ) : Asset
$type string
리턴 Asset

setVariables() 공개 메소드

public setVariables ( array $variables ) : Asset
$variables array
리턴 Asset

프로퍼티 상세

$configurationManager 보호되어 있는 프로퍼티

protected ConfigurationManagerInterface,TYPO3\CMS\Extbase\Configuration $configurationManager
리턴 TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface

$content 보호되어 있는 프로퍼티

protected string $content
리턴 string

$dependencies 보호되어 있는 프로퍼티

protected array $dependencies
리턴 array

$external 보호되어 있는 프로퍼티

protected bool $external
리턴 boolean

$fluid 보호되어 있는 프로퍼티

protected bool $fluid
리턴 boolean

$movable 보호되어 있는 프로퍼티

protected bool $movable
리턴 boolean

$name 보호되어 있는 프로퍼티

protected string $name
리턴 string

$namedChunks 보호되어 있는 프로퍼티

protected bool $namedChunks
리턴 boolean

$path 보호되어 있는 프로퍼티

protected string $path
리턴 string

$removed 보호되어 있는 프로퍼티

protected bool $removed
리턴 boolean

$rewrite 보호되어 있는 프로퍼티

protected bool $rewrite
리턴 boolean

$settings 보호되어 있는 프로퍼티

protected array $settings
리턴 array

$standalone 보호되어 있는 프로퍼티

protected bool $standalone
리턴 boolean

$type 보호되어 있는 프로퍼티

protected string $type
리턴 string

$variables 보호되어 있는 프로퍼티

protected array $variables
리턴 array