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.
Afficher le fichier
Open project: fluidtypo3/flux
Class Usage Examples
Protected Properties
Méthodes publiques
Méthodes protégées
Method Details
__construct()
public méthode
ensureAbsolutePath()
protected méthode
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 méthode
Will replace any currently configured paths.
fillFromTypoScriptArray()
public méthode
- 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 méthode
getPartialRootPaths()
public méthode
getTemplateRootPaths()
public méthode
resolveAvailableLayoutFiles()
public méthode
resolveAvailablePartialFiles()
public méthode
resolveAvailableTemplateFiles()
public méthode
resolveFilesInFolders()
protected méthode
setLayoutRootPaths()
public méthode
setPartialRootPaths()
public méthode
setTemplateRootPaths()
public méthode
Property Details
$layoutRootPaths protected_oe property
protected array $layoutRootPaths |
Résultat |
array |
|
$partialRootPaths protected_oe property
protected array $partialRootPaths |
Résultat |
array |
|
$templateRootPaths protected_oe property
protected array $templateRootPaths |
Résultat |
array |
|