TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
TemplatePaths Class Reference
Inheritance diagram for TemplatePaths:

Public Member Functions

 fillDefaultsByPackageName ($packageName)
 
 setTemplateRootPaths (array $templateRootPaths)
 
 setLayoutRootPaths (array $layoutRootPaths)
 
 setPartialRootPaths (array $partialRootPaths)
 
 getPartialPathAndFilename ($partialName)
 

Protected Member Functions

 getExtensionPrivateResourcesPath ($extensionKey)
 
 getConfigurationManager ()
 
 getContextSpecificViewConfiguration ($extensionKey)
 
 getRuntimeCache ()
 
 sanitizePath ($path)
 
 ensureAbsolutePath ($reference)
 

Protected Attributes

 $typoScript = []
 
 $templateSource
 
 $templatePathAndFilename
 

Detailed Description

Class 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.

Definition at line 33 of file TemplatePaths.php.

Member Function Documentation

ensureAbsolutePath (   $reference)
protected

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.

Parameters
mixed$reference
Returns
string

Definition at line 162 of file TemplatePaths.php.

References GeneralUtility\getFileAbsFileName(), and PathUtility\isAbsolutePath().

Referenced by TemplatePaths\sanitizePath().

fillDefaultsByPackageName (   $packageName)

Fills the path arrays with defaults, by package name. Reads those defaults from TypoScript if possible and if not defined, uses fallback paths by convention.

Parameters
string$packageName
Returns
void

Definition at line 185 of file TemplatePaths.php.

References TemplatePaths\getContextSpecificViewConfiguration().

getConfigurationManager ( )
protected
Returns
ConfigurationManagerInterface

Definition at line 66 of file TemplatePaths.php.

References GeneralUtility\makeInstance().

Referenced by TemplatePaths\getContextSpecificViewConfiguration().

getExtensionPrivateResourcesPath (   $extensionKey)
protected
Parameters
string$extensionKey
Returns
string|NULL

Definition at line 54 of file TemplatePaths.php.

References ExtensionManagementUtility\extPath(), and ExtensionManagementUtility\isLoaded().

Referenced by TemplatePaths\getContextSpecificViewConfiguration().

getPartialPathAndFilename (   $partialName)

Public API for currently protected method. Can be dropped when switching to Fluid 1.1.0 or above.

Parameters
string$partialName
Returns
string

Definition at line 236 of file TemplatePaths.php.

getRuntimeCache ( )
protected
Returns
VariableFrontend

Definition at line 131 of file TemplatePaths.php.

References GeneralUtility\makeInstance().

Referenced by TemplatePaths\getContextSpecificViewConfiguration().

sanitizePath (   $path)
protected
Parameters
string | array$path
Returns
string

Definition at line 140 of file TemplatePaths.php.

References TemplatePaths\ensureAbsolutePath().

setLayoutRootPaths ( array  $layoutRootPaths)

Overridden setter with enforced sorting behavior

Parameters
array$layoutRootPaths
Returns
void

Definition at line 209 of file TemplatePaths.php.

References ArrayUtility\sortArrayWithIntegerKeys().

setPartialRootPaths ( array  $partialRootPaths)

Overridden setter with enforced sorting behavior

Parameters
array$partialRootPaths
Returns
void

Definition at line 222 of file TemplatePaths.php.

References ArrayUtility\sortArrayWithIntegerKeys().

setTemplateRootPaths ( array  $templateRootPaths)

Overridden setter with enforced sorting behavior

Parameters
array$templateRootPaths
Returns
void

Definition at line 196 of file TemplatePaths.php.

References ArrayUtility\sortArrayWithIntegerKeys().

Member Data Documentation

$templatePathAndFilename
protected

Definition at line 48 of file TemplatePaths.php.

$templateSource
protected

Definition at line 43 of file TemplatePaths.php.

$typoScript = []
protected

Definition at line 38 of file TemplatePaths.php.