PHP 클래스 Neos\FluidAdaptor\View\TemplatePaths

Custom implementation for template paths resolving, one which differs from the base implementation in that it is capable of resolving template paths based on TypoScript configuration when given a package name, and is aware of the Frontend/Backend contexts of TYPO3.
상속: extends TYPO3Fluid\Fluid\View\TemplatePaths
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$layoutRootPathPattern string
$options array
$packageManager Neos\Flow\Package\PackageManagerInterface
$partialRootPathPattern string
$patternReplacementVariables string[] A map of key => values to be replaced in path patterns.
$templateRootPathPattern string

공개 메소드들

메소드 설명
__construct ( array $options = [] )
getLayoutPathAndFilename ( string $layoutName = 'Default' ) : string Resolve the path and file name of the layout file, based on $this->options['layoutPathAndFilename'] and $this->options['layoutPathAndFilenamePattern'].
getLayoutRootPaths ( ) : array
getOption ( string $optionName ) : mixed Get a specific option of this object
getPartialPathAndFilename ( string $partialName ) : string Resolve the partial path and filename based on $this->options['partialPathAndFilenamePattern'].
getPartialRootPaths ( )
getPatternReplacementVariables ( ) : string[]
getTemplateRootPathPattern ( ) : string
getTemplateRootPaths ( ) : array Resolves the template root to be used inside other paths.
injectPackageManager ( Neos\Flow\Package\PackageManagerInterface $packageManager )
resolveTemplateFileForControllerAndActionAndFormat ( string $controller, string $action, string $format = null ) : mixed | string Resolves a template file based on the given controller and action, together with eventually defined patternReplacementVariables.
setLayoutRootPath ( string $layoutRootPath )
setLayoutRootPathPattern ( string $layoutRootPathPattern )
setOption ( string $optionName, mixed $value ) : void Set a specific option of this object
setPartialRootPath ( string $partialRootPath )
setPartialRootPathPattern ( string $partialRootPathPattern )
setPatternReplacementVariables ( string[] $patternReplacementVariables )
setTemplateRootPath ( string $templateRootPath )
setTemplateRootPathPattern ( string $templateRootPathPattern )

보호된 메소드들

메소드 설명
createIdentifierForFile ( string $pathAndFilename, string $prefix ) : string Returns a unique identifier for the given file in the format ____ The SH1 hash is a checksum that is based on the file path and last modification date
expandGenericPathPattern ( string $pattern, array $patternReplacementVariables, boolean $bubbleControllerAndSubpackage, boolean $formatIsOptional ) : array Processes following placeholders inside $pattern: - "@templateRoot" - "@partialRoot" - "@layoutRoot" - "@subpackage" - "@controller" - "@format"
expandPatterns ( array $patterns, string $search, array $replacements ) : void Expands the given $patterns by adding an array element for each $replacement replacing occurrences of $search.
expandSubPackageAndController ( array $paths, string $controllerName, null $subPackageKey = null, boolean $bubbleControllerAndSubpackage = false ) : array
getPackagePath ( string $packageName ) : string
getPackagePrivateResourcesPath ( string $packageKey ) : string | null
replacePatternVariable ( array $paths, string $variableName, string $variableValue ) : array
sanitizePath ( string $path ) : string Sanitize a path, ensuring it is absolute and if a directory, suffixed by a trailing slash.

메소드 상세

__construct() 공개 메소드

public __construct ( array $options = [] )
$options array

createIdentifierForFile() 보호된 메소드

Returns a unique identifier for the given file in the format ____ The SH1 hash is a checksum that is based on the file path and last modification date
protected createIdentifierForFile ( string $pathAndFilename, string $prefix ) : string
$pathAndFilename string
$prefix string
리턴 string

expandGenericPathPattern() 보호된 메소드

This method is used to generate "fallback chains" for file system locations where a certain Partial can reside. If $bubbleControllerAndSubpackage is FALSE and $formatIsOptional is FALSE, then the resulting array will only have one element with all the above placeholders replaced. If you set $bubbleControllerAndSubpackage to TRUE, then you will get an array with potentially many elements: The first element of the array is like above. The second element has the @ controller part set to "" (the empty string) The third element now has the @ controller part again stripped off, and has the last subpackage part stripped off as well. This continues until both "@subpackage" and "@controller" are empty. Example for $bubbleControllerAndSubpackage is TRUE, we have the MyCompany\MyPackage\MySubPackage\Controller\MyController as Controller Object Name and the current format is "html" If pattern is "@templateRoot/@subpackage/@controller/@action.@format", then the resulting array is: - "Resources/Private/Templates/MySubPackage/My/@action.html" - "Resources/Private/Templates/MySubPackage/@action.html" - "Resources/Private/Templates/@action.html" If you set $formatIsOptional to TRUE, then for any of the above arrays, every element will be duplicated - once with "@format" replaced by the current request format, and once with ."@format" stripped off.
protected expandGenericPathPattern ( string $pattern, array $patternReplacementVariables, boolean $bubbleControllerAndSubpackage, boolean $formatIsOptional ) : array
$pattern string Pattern to be resolved
$patternReplacementVariables array The variables to replace in the pattern
$bubbleControllerAndSubpackage boolean if TRUE, then we successively split off parts from "@controller" and "@subpackage" until both are empty.
$formatIsOptional boolean if TRUE, then half of the resulting strings will have ."@format" stripped off, and the other half will have it.
리턴 array unix style paths

expandPatterns() 보호된 메소드

Expands the given $patterns by adding an array element for each $replacement replacing occurrences of $search.
protected expandPatterns ( array $patterns, string $search, array $replacements ) : void
$patterns array
$search string
$replacements array
리턴 void

expandSubPackageAndController() 보호된 메소드

protected expandSubPackageAndController ( array $paths, string $controllerName, null $subPackageKey = null, boolean $bubbleControllerAndSubpackage = false ) : array
$paths array
$controllerName string
$subPackageKey null
$bubbleControllerAndSubpackage boolean
리턴 array

getLayoutPathAndFilename() 공개 메소드

In case a layout has already been set with setLayoutPathAndFilename(), this method returns that path, otherwise a path and filename will be resolved using the layoutPathAndFilenamePattern.
public getLayoutPathAndFilename ( string $layoutName = 'Default' ) : string
$layoutName string Name of the layout to use. If none given, use "Default"
리턴 string Path and filename of layout files

getLayoutRootPaths() 공개 메소드

public getLayoutRootPaths ( ) : array
리턴 array

getOption() 공개 메소드

Get a specific option of this object
public getOption ( string $optionName ) : mixed
$optionName string
리턴 mixed

getPackagePath() 보호된 메소드

protected getPackagePath ( string $packageName ) : string
$packageName string
리턴 string

getPackagePrivateResourcesPath() 보호된 메소드

protected getPackagePrivateResourcesPath ( string $packageKey ) : string | null
$packageKey string
리턴 string | null

getPartialPathAndFilename() 공개 메소드

Resolve the partial path and filename based on $this->options['partialPathAndFilenamePattern'].
public getPartialPathAndFilename ( string $partialName ) : string
$partialName string The name of the partial
리턴 string the full path which should be used. The path definitely exists.

getPartialRootPaths() 공개 메소드

public getPartialRootPaths ( )

getPatternReplacementVariables() 공개 메소드

public getPatternReplacementVariables ( ) : string[]
리턴 string[]

getTemplateRootPathPattern() 공개 메소드

getTemplateRootPaths() 공개 메소드

Resolves the template root to be used inside other paths.
public getTemplateRootPaths ( ) : array
리턴 array Path(s) to template root directory

injectPackageManager() 공개 메소드

public injectPackageManager ( Neos\Flow\Package\PackageManagerInterface $packageManager )
$packageManager Neos\Flow\Package\PackageManagerInterface

replacePatternVariable() 보호된 메소드

protected replacePatternVariable ( array $paths, string $variableName, string $variableValue ) : array
$paths array
$variableName string
$variableValue string
리턴 array

resolveTemplateFileForControllerAndActionAndFormat() 공개 메소드

Resolves a template file based on the given controller and action, together with eventually defined patternReplacementVariables.
public resolveTemplateFileForControllerAndActionAndFormat ( string $controller, string $action, string $format = null ) : mixed | string
$controller string
$action string
$format string
리턴 mixed | string

sanitizePath() 보호된 메소드

Sanitize a path, ensuring it is absolute and if a directory, suffixed by a trailing slash.
protected sanitizePath ( string $path ) : string
$path string
리턴 string

setLayoutRootPath() 공개 메소드

public setLayoutRootPath ( string $layoutRootPath )
$layoutRootPath string

setLayoutRootPathPattern() 공개 메소드

public setLayoutRootPathPattern ( string $layoutRootPathPattern )
$layoutRootPathPattern string

setOption() 공개 메소드

Set a specific option of this object
public setOption ( string $optionName, mixed $value ) : void
$optionName string
$value mixed
리턴 void

setPartialRootPath() 공개 메소드

public setPartialRootPath ( string $partialRootPath )
$partialRootPath string

setPartialRootPathPattern() 공개 메소드

public setPartialRootPathPattern ( string $partialRootPathPattern )
$partialRootPathPattern string

setPatternReplacementVariables() 공개 메소드

public setPatternReplacementVariables ( string[] $patternReplacementVariables )
$patternReplacementVariables string[]

setTemplateRootPath() 공개 메소드

public setTemplateRootPath ( string $templateRootPath )
$templateRootPath string

setTemplateRootPathPattern() 공개 메소드

public setTemplateRootPathPattern ( string $templateRootPathPattern )
$templateRootPathPattern string

프로퍼티 상세

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

protected string $layoutRootPathPattern
리턴 string

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

protected array $options
리턴 array

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

protected PackageManagerInterface,Neos\Flow\Package $packageManager
리턴 Neos\Flow\Package\PackageManagerInterface

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

protected string $partialRootPathPattern
리턴 string

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

A map of key => values to be replaced in path patterns.
protected string[] $patternReplacementVariables
리턴 string[]

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

protected string $templateRootPathPattern
리턴 string