PHP Класс 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.
Показать файл
Открыть проект
Примеры использования класса
Защищенные свойства (Protected)
Открытые методы
Защищенные методы
Описание методов
__construct()
публичный Метод
ensureAbsolutePath()
защищенный Метод
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()
публичный Метод
Will replace any currently configured paths.
fillFromTypoScriptArray()
публичный Метод
- 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()
публичный Метод
getPartialRootPaths()
публичный Метод
getTemplateRootPaths()
публичный Метод
resolveAvailableLayoutFiles()
публичный Метод
resolveAvailablePartialFiles()
публичный Метод
resolveAvailableTemplateFiles()
публичный Метод
resolveFilesInFolders()
защищенный Метод
setLayoutRootPaths()
публичный Метод
setPartialRootPaths()
публичный Метод
setTemplateRootPaths()
публичный Метод
toArray()
публичный Метод
Описание свойств
$layoutRootPaths защищенное свойство
protected array $layoutRootPaths |
Результат |
array |
|
$partialRootPaths защищенное свойство
protected array $partialRootPaths |
Результат |
array |
|
$templateRootPaths защищенное свойство
protected array $templateRootPaths |
Результат |
array |
|