PHP Class FluidTYPO3\Flux\View\TemplatePaths
Class used to hold and resolve template files
and paths in multiple supported ways.
The purpose of this class is to homogenise the
API that is used when working with template
paths coming from TypoScript, as well as serve
as a way to quickly generate default template-,
layout- and partial root paths by package.
The constructor accepts two different types of
input - anything not of those types is silently
ignored:
- a
string input is assumed a package name
and will call the
fillDefaultsByPackageName
value filling method.
- an
array input is assumed a TypoScript-style
array of root paths in one or more of the
supported structures and will call the
fillFromTypoScriptArray method.
Either method can also be called after instance
is created, but both will overwrite any paths
you have previously configured.
Datei anzeigen
Open project: fluidtypo3/flux
Class Usage Examples
Protected Properties
Public Methods
Protected Methods
Method Details
__construct()
public method
ensureAbsolutePath()
protected method
Guarantees that $reference is turned into a
correct, absolute path. The input can be a
relative path or a FILE: or EXT: reference
but cannot be a FAL resource identifier.
fillDefaultsByPackageName()
public method
Will replace any currently configured paths.
fillFromTypoScriptArray()
public method
- plugin.tx_yourext.view.templateRootPath and siblings.
- plugin.tx_yourext.view.templateRootPaths and siblings.
- plugin.tx_yourext.view.overlays.otherextension.templateRootPath and siblings.
The paths are treated as follows, using the
template-type paths as an example:
- If templateRootPath is defined, it gets
used as the _first_ path in the internal
paths array.
- If templateRootPaths is defined, all
values from it are _appended_ to the
internal paths array.
- If overlays.* exists in the array it is
iterated, each templateRootPath entry
from it _appended_ to the internal array.
The result is that after filling, the path
arrays will contain one or more entries in
the order described above, depending on how
many of the possible configurations were
present in the input array.
Will replace any currently configured paths.
getLayoutRootPaths()
public method
getPartialRootPaths()
public method
getTemplateRootPaths()
public method
resolveAvailableLayoutFiles()
public method
resolveAvailablePartialFiles()
public method
resolveAvailableTemplateFiles()
public method
resolveFilesInFolders()
protected method
setLayoutRootPaths()
public method
setPartialRootPaths()
public method
setTemplateRootPaths()
public method
Property Details
$layoutRootPaths protected_oe property
protected array $layoutRootPaths |
return |
array |
|
$partialRootPaths protected_oe property
protected array $partialRootPaths |
return |
array |
|
$templateRootPaths protected_oe property
protected array $templateRootPaths |
return |
array |
|