TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ExtendedTemplateService Class Reference
Inheritance diagram for ExtendedTemplateService:
TemplateService ConfigurationForm

Public Member Functions

 substituteConstants ($all)
 
 substituteConstantsCallBack ($matches)
 
 substituteCMarkers ($all)
 
 ext_getSetup ($theSetup, $theKey)
 
 ext_getObjTree ($arr, $depth_in, $depthData, $parentType= '', $parentValue= '', $alphaSort= '0')
 
 lineNumberToScript (array $lnArr)
 
 makeHtmlspecialchars ($theValue)
 
 ext_getSearchKeys ($arr, $depth_in, $searchString, $keyArray)
 
 ext_getRootlineNumber ($pid)
 
 ext_process_hierarchyInfo (array $depthDataArr, &$pointer)
 
 ext_outputTS (array $config, $lineNumbers=false, $comments=false, $crop=false, $syntaxHL=false, $syntaxHLBlockmode=0)
 
 ext_fixed_lgd ($string, $chars)
 
 ext_lnBreakPointWrap ($lineNumber, $str)
 
 ext_formatTS ($input, $ln, $comments=true, $crop=false)
 
 ext_getFirstTemplate ($id, $template_uid=0)
 
 ext_getAllTemplates ($id)
 
 ext_compareFlatSetups ($default)
 
 ext_categorizeEditableConstants ($editConstArray)
 
 ext_getCategoryLabelArray ()
 
 ext_getTypeData ($type)
 
 ext_getTSCE_config ($category)
 
 ext_getKeyImage ($key)
 
 ext_getTSCE_config_image ($imgConf)
 
 ext_fNandV ($params)
 
 ext_regObjectPositions ($constants)
 
 ext_regObjects ($pre)
 
 ext_putValueInConf ($key, $var)
 
 ext_removeValueInConf ($key)
 
 ext_depthKeys ($arr, $settings)
 
 ext_procesInput ($http_post_vars, $http_post_files, $theConstants, $tplRow)
 
 ext_prevPageWithTemplate ($id, $perms_clause)
 
- Public Member Functions inherited from TemplateService
 getProcessExtensionStatics ()
 
 setProcessExtensionStatics ($processExtensionStatics)
 
 setVerbose ($verbose)
 
 init ()
 
 getCurrentPageData ()
 
 runThroughTemplates ($theRootLine, $start_template_uid=0)
 
 processTemplate ($row, $idList, $pid, $templateID= '', $templateParent= '', $includePath= '')
 
 updateRootlineData ($fullRootLine)
 
 includeStaticTypoScriptSources ($idList, $templateID, $pid, $row)
 
 addExtensionStatics ($idList, $templateID, $pid, $row)
 
 prependStaticExtra ($subrow)
 
 versionOL (&$row)
 
 processIncludes ()
 
 flattenSetup ($setupArray, $prefix)
 
 substituteConstants ($all)
 
 substituteConstantsCallBack ($matches)
 
 splitConfArray ($conf, $splitCount)
 
 getFileName ($fileFromSetup)
 
 printTitle ($pageTitle, $noTitle=false, $showTitleFirst=false, $pageTitleSeparator= '')
 
 fileContent ($fileName)
 
 wrap ($content, $wrap)
 
 removeQueryString ($url)
 
 getRootlineLevel ($list)
 
 linkData ($page, $oTarget, $no_cache, $script, $overrideArray=null, $addParams= '', $typeOverride= '', $targetDomain= '')
 
 getFromMPmap ($pageId=0)
 
 initMPmap_create ($id, $MP_array=array(), $level=0)
 

Public Attributes

 $edit_divider = '###MOD_TS:EDITABLE_CONSTANTS###'
 
 $HTMLcolorList = 'aqua,beige,black,blue,brown,fuchsia,gold,gray,green,lime,maroon,navy,olive,orange,purple,red,silver,tan,teal,turquoise,yellow,white'
 
 $categories
 
 $subCategories
 
 $backend_info = true
 
 $ext_inBrace = 0
 
 $tsbrowser_searchKeys = array()
 
 $tsbrowser_depthKeys = array()
 
 $constantMode = ''
 
 $regexMode = ''
 
 $fixedLgd = ''
 
 $ext_lineNumberOffset = 0
 
 $ext_localGfxPrefix = ''
 
 $ext_localWebGfxPrefix = ''
 
 $ext_expandAllNotes = 0
 
 $ext_noPMicons = 0
 
 $ext_noSpecialCharsOnLabels = 0
 
 $ext_listOfTemplatesArr = array()
 
 $ext_lineNumberOffset_mode = ''
 
 $ext_dontCheckIssetValues = 0
 
 $ext_printAll = 0
 
 $ext_CEformName = 'forms[0]'
 
 $doNotSortCategoriesBeforeMakingForm = false
 
 $templateTitles = array()
 
 $clearList_const_temp
 
 $clearList_setup_temp
 
 $bType = ''
 
 $linkObjects = false
 
 $helpConfig = array()
 
 $changed = false
 
 $raw = array()
 
 $rawP = 0
 
 $lastComment = ''
 
- Public Attributes inherited from TemplateService
 $tt_track = true
 
 $forceTemplateParsing = false
 
 $matchAlternative = array()
 
 $matchAll = false
 
 $backend_info = false
 
 $ext_constants_BRP = 0
 
 $ext_config_BRP = 0
 
 $ext_regLinenumbers = false
 
 $ext_regComments = false
 
 $tempPath = 'typo3temp/'
 
 $whereClause = ''
 
 $debug = false
 
 $allowedPaths = array()
 
 $simulationHiddenOrTime = 0
 
 $loaded = false
 
 $setup = array()
 
 $flatSetup = array()
 
 $config = array()
 
 $constants = array()
 
 $hierarchyInfo = array()
 
 $hierarchyInfoToRoot = array()
 
 $nextLevel = 0
 
 $rootId
 
 $rootLine
 
 $absoluteRootLine
 
 $outermostRootlineIndexWithTemplate = 0
 
 $rowSum
 
 $sitetitle = ''
 
 $sections
 
 $sectionsMatch
 
 $clearList_const = array()
 
 $clearList_setup = array()
 
 $parserErrors = array()
 
 $setup_constants = array()
 
 $fileCache = array()
 
 $frames = array()
 
 $MPmap = ''
 

Protected Member Functions

 getRootLine ()
 
 getDatabaseConnection ()
 
 getLanguageService ()
 
 getDocumentTemplate ()
 
- Protected Member Functions inherited from TemplateService
 getTypoScriptSourceFileContent ($filePath, $baseName)
 
 addDefaultTypoScript ()
 
 getDatabaseConnection ()
 
 getTypoScriptFrontendController ()
 
 getTimeTracker ()
 

Protected Attributes

 $categoryLabels = array()
 
 $lnToScript = null
 
 $Cmarker = ''
 
 $objReg = array()
 
- Protected Attributes inherited from TemplateService
 $verbose = false
 
 $templateIncludePaths = array()
 
 $extensionStaticsProcessed = false
 
 $processExtensionStatics = false
 
 $isDefaultTypoScriptAdded = false
 
 $processIncludesHasBeenRun = false
 

Additional Inherited Members

- Static Public Member Functions inherited from TemplateService
static sortedKeyList ($setupArr, $acceptOnlyProperties=false)
 

Detailed Description

TSParser extension class to TemplateService Contains functions for the TS module in TYPO3 backend

Definition at line 33 of file ExtendedTemplateService.php.

Member Function Documentation

ext_categorizeEditableConstants (   $editConstArray)
Parameters
array$editConstArray
Returns
void

Definition at line 1000 of file ExtendedTemplateService.php.

Referenced by ConfigurationForm\ext_setValueArray().

ext_compareFlatSetups (   $default)

This function compares the flattened constants (default and all). Returns an array with the constants from the whole template which may be edited by the module.

Parameters
array$default
Returns
array

Definition at line 919 of file ExtendedTemplateService.php.

References ExtendedTemplateService\getLanguageService().

ext_depthKeys (   $arr,
  $settings 
)
Parameters
array$arr
array$settings
Returns
array

Definition at line 1510 of file ExtendedTemplateService.php.

ext_fixed_lgd (   $string,
  $chars 
)

Returns a new string of max. $chars length If the string is longer, it will be truncated and prepended with '...' $chars must be an integer of at least 4

Parameters
string$string
int$chars
Returns
string

Definition at line 803 of file ExtendedTemplateService.php.

References GeneralUtility\fixed_lgd_cs().

Referenced by ExtendedTemplateService\ext_formatTS(), and ExtendedTemplateService\ext_getObjTree().

ext_fNandV (   $params)
Parameters
array$params
Returns
array

Definition at line 1148 of file ExtendedTemplateService.php.

ext_formatTS (   $input,
  $ln,
  $comments = true,
  $crop = false 
)
Parameters
string$input
bool$ln
bool$comments
bool$crop
Returns
string

Definition at line 836 of file ExtendedTemplateService.php.

References elseif, ExtendedTemplateService\ext_fixed_lgd(), and ExtendedTemplateService\ext_lnBreakPointWrap().

Referenced by ExtendedTemplateService\ext_outputTS().

ext_getAllTemplates (   $id)
Parameters
int$id
Returns
array[] Array of template records

Definition at line 891 of file ExtendedTemplateService.php.

References ExtendedTemplateService\getDatabaseConnection(), and BackendUtility\workspaceOL().

ext_getCategoryLabelArray ( )
Returns
array

Definition at line 1021 of file ExtendedTemplateService.php.

Referenced by ConfigurationForm\ext_getCategoriesForModMenu().

ext_getFirstTemplate (   $id,
  $template_uid = 0 
)
Parameters
int$id
int$template_uid
Returns
array|NULL Returns the template record or NULL if none was found

Definition at line 871 of file ExtendedTemplateService.php.

References ExtendedTemplateService\getDatabaseConnection(), and BackendUtility\workspaceOL().

Referenced by ExtendedTemplateService\ext_prevPageWithTemplate().

ext_getKeyImage (   $key)
Parameters
string$key
Returns
string
Deprecated:
since TYPO3 CMS 7, will be removed with TYPO3 CMS 8

Definition at line 1113 of file ExtendedTemplateService.php.

References GeneralUtility\logDeprecatedFunction().

ext_getObjTree (   $arr,
  $depth_in,
  $depthData,
  $parentType = '',
  $parentValue = '',
  $alphaSort = '0' 
)

Get object tree

Parameters
array$arr
string$depth_in
string$depthData
string$parentType(unused)
string$parentValue(unused)
string$alphaSortsorts the array keys / tree by alphabet when set to 1
Returns
array

Definition at line 411 of file ExtendedTemplateService.php.

References ExtendedTemplateService\$ext_expandAllNotes, $GLOBALS, GeneralUtility\_GP(), MathUtility\canBeInterpretedAsInteger(), ExtendedTemplateService\ext_fixed_lgd(), GeneralUtility\inList(), and ExtendedTemplateService\lineNumberToScript().

ext_getRootlineNumber (   $pid)
Parameters
int$pid
Returns
int

Definition at line 656 of file ExtendedTemplateService.php.

References ExtendedTemplateService\getRootLine().

ext_getSearchKeys (   $arr,
  $depth_in,
  $searchString,
  $keyArray 
)
Parameters
array$arr
string$depth_in
string$searchString
array$keyArray
Returns
array
Exceptions
Exception

Definition at line 591 of file ExtendedTemplateService.php.

ext_getSetup (   $theSetup,
  $theKey 
)
Parameters
array$theSetup
string$theKey
Returns
array

Definition at line 382 of file ExtendedTemplateService.php.

ext_getTSCE_config (   $category)
ext_getTSCE_config_image (   $imgConf)
Parameters
string$imgConf
Returns
string

Definition at line 1123 of file ExtendedTemplateService.php.

References $GLOBALS, elseif, GeneralUtility\getFileAbsFileName(), and PathUtility\stripPathSitePrefix().

Referenced by ExtendedTemplateService\ext_getTSCE_config().

ext_getTypeData (   $type)
Parameters
string$type
Returns
array

Definition at line 1037 of file ExtendedTemplateService.php.

References GeneralUtility\inList(), and GeneralUtility\intExplode().

Referenced by ExtendedTemplateService\ext_procesInput().

ext_lnBreakPointWrap (   $lineNumber,
  $str 
)
Parameters
int$lineNumberLine Number
array$str
Returns
string

Definition at line 823 of file ExtendedTemplateService.php.

Referenced by ExtendedTemplateService\ext_formatTS().

ext_outputTS ( array  $config,
  $lineNumbers = false,
  $comments = false,
  $crop = false,
  $syntaxHL = false,
  $syntaxHLBlockmode = 0 
)

Get formatted HTML output for TypoScript either with Syntaxhiglighting or in plain mode

Parameters
array$configArray with simple strings of typoscript code.
bool$lineNumbersPrepend linNumbers to each line.
bool$commentsEnable including comments in output.
bool$cropEnable cropping of long lines.
bool$syntaxHLEnrich output with syntaxhighlighting.
int$syntaxHLBlockmode
Returns
string

Definition at line 777 of file ExtendedTemplateService.php.

References ExtendedTemplateService\ext_formatTS(), and GeneralUtility\makeInstance().

ext_prevPageWithTemplate (   $id,
  $perms_clause 
)
Parameters
int$id
string$perms_clause
Returns
array

Definition at line 1656 of file ExtendedTemplateService.php.

References TemplateService\$rootLine, BackendUtility\BEgetRootLine(), and ExtendedTemplateService\ext_getFirstTemplate().

ext_procesInput (   $http_post_vars,
  $http_post_files,
  $theConstants,
  $tplRow 
)

Proces input

Parameters
array$http_post_vars
array$http_post_files(not used anymore)
array$theConstants
array$tplRowNot used
Returns
void

Definition at line 1544 of file ExtendedTemplateService.php.

References ExtendedTemplateService\ext_getTypeData(), ExtendedTemplateService\ext_putValueInConf(), ExtendedTemplateService\ext_removeValueInConf(), MathUtility\forceIntegerInRange(), and GeneralUtility\inList().

ext_process_hierarchyInfo ( array  $depthDataArr,
$pointer 
)

Processes the flat array from TemplateService->hierarchyInfo and turns it into a hierachical array to show dependencies (used by TemplateAnalyzer)

Parameters
array$depthDataArr(empty array on external call)
int&$pointerElement number (1! to count()) of $this->hierarchyInfo that should be processed.
Returns
array Processed hierachyInfo.

Definition at line 747 of file ExtendedTemplateService.php.

ext_putValueInConf (   $key,
  $var 
)
Parameters
string$key
string$var
Returns
void

Definition at line 1473 of file ExtendedTemplateService.php.

Referenced by ExtendedTemplateService\ext_procesInput().

ext_regObjectPositions (   $constants)
Parameters
string$constants
Returns
void

Definition at line 1414 of file ExtendedTemplateService.php.

References TemplateService\$constants, and ExtendedTemplateService\ext_regObjects().

ext_regObjects (   $pre)
Parameters
string$pre
Returns
void

Definition at line 1429 of file ExtendedTemplateService.php.

References elseif.

Referenced by ExtendedTemplateService\ext_regObjectPositions().

ext_removeValueInConf (   $key)
Parameters
string$key
Returns
void

Definition at line 1495 of file ExtendedTemplateService.php.

Referenced by ExtendedTemplateService\ext_procesInput().

getDatabaseConnection ( )
protected
Returns
DatabaseConnection

Definition at line 1678 of file ExtendedTemplateService.php.

References $GLOBALS.

Referenced by ExtendedTemplateService\ext_getAllTemplates(), and ExtendedTemplateService\ext_getFirstTemplate().

getDocumentTemplate ( )
protected
Returns
DocumentTemplate

Definition at line 1694 of file ExtendedTemplateService.php.

References $GLOBALS.

getLanguageService ( )
protected
Returns
LanguageService

Definition at line 1686 of file ExtendedTemplateService.php.

References $GLOBALS.

Referenced by ExtendedTemplateService\ext_compareFlatSetups(), and ConfigurationForm\ext_getForm().

getRootLine ( )
protected
Returns
array

Definition at line 1670 of file ExtendedTemplateService.php.

References $GLOBALS.

Referenced by ExtendedTemplateService\ext_getRootlineNumber().

lineNumberToScript ( array  $lnArr)

Find the originating template name for an array of line numbers (TypoScript setup only!) Given an array of linenumbers the method will try to find the corresponding template where this line originated The linenumber indicates the last lineNumber that is part of the template

lineNumbers are in sync with the calculated lineNumbers '.ln..' in TypoScriptParser

Parameters
array$lnArrArray with linenumbers (might have some extra symbols, for example for unsetting) to be processed
Returns
array The same array where each entry has been prepended by the template title if available

Definition at line 542 of file ExtendedTemplateService.php.

Referenced by ExtendedTemplateService\ext_getObjTree().

makeHtmlspecialchars (   $theValue)
Parameters
array$theValue
Returns
array
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - use htmlspecialchars() directly

Definition at line 577 of file ExtendedTemplateService.php.

References GeneralUtility\logDeprecatedFunction().

substituteCMarkers (   $all)

Subsitute markers

Parameters
string$all
Returns
string

Definition at line 319 of file ExtendedTemplateService.php.

substituteConstants (   $all)

Substitute constant

Parameters
string$all
Returns
string

Definition at line 282 of file ExtendedTemplateService.php.

substituteConstantsCallBack (   $matches)

Call back method for preg_replace_callback in substituteConstants

Parameters
array$matchesRegular expression matches
Returns
string Replacement
See Also
substituteConstants()

Definition at line 295 of file ExtendedTemplateService.php.

Member Data Documentation

$backend_info = true

Definition at line 109 of file ExtendedTemplateService.php.

$bType = ''

Definition at line 239 of file ExtendedTemplateService.php.

$categories
Initial value:
= array(
'basic' => array(),
'menu' => array(),
'content' => array(),
'page' => array(),
'advanced' => array(),
'all' => array()
)

Definition at line 51 of file ExtendedTemplateService.php.

$categoryLabels = array()
protected

Definition at line 70 of file ExtendedTemplateService.php.

$changed = false

Definition at line 254 of file ExtendedTemplateService.php.

$clearList_const_temp

Definition at line 224 of file ExtendedTemplateService.php.

$clearList_setup_temp

Definition at line 229 of file ExtendedTemplateService.php.

$Cmarker = ''
protected

Definition at line 234 of file ExtendedTemplateService.php.

$constantMode = ''

Definition at line 133 of file ExtendedTemplateService.php.

$doNotSortCategoriesBeforeMakingForm = false

Definition at line 207 of file ExtendedTemplateService.php.

$edit_divider = '###MOD_TS:EDITABLE_CONSTANTS###'

Definition at line 41 of file ExtendedTemplateService.php.

$ext_CEformName = 'forms[0]'

Definition at line 202 of file ExtendedTemplateService.php.

$ext_dontCheckIssetValues = 0

Definition at line 192 of file ExtendedTemplateService.php.

$ext_expandAllNotes = 0

Definition at line 163 of file ExtendedTemplateService.php.

Referenced by ExtendedTemplateService\ext_getObjTree().

$ext_inBrace = 0

Definition at line 116 of file ExtendedTemplateService.php.

$ext_lineNumberOffset = 0

Definition at line 148 of file ExtendedTemplateService.php.

$ext_lineNumberOffset_mode = ''

Definition at line 185 of file ExtendedTemplateService.php.

$ext_listOfTemplatesArr = array()

Definition at line 180 of file ExtendedTemplateService.php.

$ext_localGfxPrefix = ''

Definition at line 153 of file ExtendedTemplateService.php.

$ext_localWebGfxPrefix = ''

Definition at line 158 of file ExtendedTemplateService.php.

$ext_noPMicons = 0

Definition at line 168 of file ExtendedTemplateService.php.

$ext_noSpecialCharsOnLabels = 0

Definition at line 175 of file ExtendedTemplateService.php.

$ext_printAll = 0

Definition at line 197 of file ExtendedTemplateService.php.

$fixedLgd = ''

Definition at line 143 of file ExtendedTemplateService.php.

$helpConfig = array()

Definition at line 249 of file ExtendedTemplateService.php.

$HTMLcolorList = 'aqua,beige,black,blue,brown,fuchsia,gold,gray,green,lime,maroon,navy,olive,orange,purple,red,silver,tan,teal,turquoise,yellow,white'

Definition at line 46 of file ExtendedTemplateService.php.

$lastComment = ''

Definition at line 274 of file ExtendedTemplateService.php.

$linkObjects = false

Definition at line 244 of file ExtendedTemplateService.php.

$lnToScript = null
protected

Definition at line 219 of file ExtendedTemplateService.php.

$objReg = array()
protected

Definition at line 259 of file ExtendedTemplateService.php.

$raw = array()

Definition at line 264 of file ExtendedTemplateService.php.

$rawP = 0

Definition at line 269 of file ExtendedTemplateService.php.

$regexMode = ''

Definition at line 138 of file ExtendedTemplateService.php.

$subCategories
Initial value:
= array(
'enable' => array('Enable features', 'a'),
'dims' => array('Dimensions, widths, heights, pixels', 'b'),
'file' => array('Files', 'c'),
'typo' => array('Typography', 'd'),
'color' => array('Colors', 'e'),
'links' => array('Links and targets', 'f'),
'language' => array('Language specific constants', 'g'),
'cheader' => array('Content: \'Header\'', 'ma'),
'cheader_g' => array('Content: \'Header\', Graphical', 'ma'),
'ctext' => array('Content: \'Text\'', 'mb'),
'cimage' => array('Content: \'Image\'', 'md'),
'ctextmedia' => array('Content: \'Textmedia\'', 'ml'),
'cbullets' => array('Content: \'Bullet list\'', 'me'),
'ctable' => array('Content: \'Table\'', 'mf'),
'cuploads' => array('Content: \'Filelinks\'', 'mg'),
'cmultimedia' => array('Content: \'Multimedia\'', 'mh'),
'cmedia' => array('Content: \'Media\'', 'mr'),
'cmailform' => array('Content: \'Form\'', 'mi'),
'csearch' => array('Content: \'Search\'', 'mj'),
'clogin' => array('Content: \'Login\'', 'mk'),
'cmenu' => array('Content: \'Menu/Sitemap\'', 'mm'),
'cshortcut' => array('Content: \'Insert records\'', 'mn'),
'clist' => array('Content: \'List of records\'', 'mo'),
'chtml' => array('Content: \'HTML\'', 'mq')
)

Definition at line 77 of file ExtendedTemplateService.php.

$templateTitles = array()

Definition at line 214 of file ExtendedTemplateService.php.

$tsbrowser_depthKeys = array()

Definition at line 128 of file ExtendedTemplateService.php.

$tsbrowser_searchKeys = array()

Definition at line 123 of file ExtendedTemplateService.php.