TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DocumentTemplate Class Reference

Public Member Functions

 __construct ()
 
 getPageRenderer ()
 
 setExtDirectStateProvider ()
 
 wrapClickMenuOnIcon ($content, $table, $uid=0, $listFr=true, $addParams= '', $enDisItems= '', $returnTagParameters=false)
 
 viewPageIcon ($id, $_= '')
 
 issueCommand ($params, $redirectUrl= '')
 
 getHeader ($table, $row, $path, $noViewPageIcon=false, $tWrap=array('', ''), $enableClickMenu=true)
 
 getResourceHeader (\TYPO3\CMS\Core\Resource\ResourceInterface $resource, $tWrap=array('', ''), $enableClickMenu=true)
 
 makeShortcutIcon ($gvList, $setList, $modName, $motherModName= '', $classes= '')
 
 makeShortcutUrl ($gvList, $setList)
 
 formWidth ($size=48, $textarea=false, $styleOverride= '')
 
 redirectUrls ($thisLocation= '')
 
 formatTime ($tstamp, $type)
 
 parseTime ()
 
 useCompatibilityTag ($useCompatibilityTag=true)
 
 startPage ($title)
 
 endPage ()
 
 render ($title, $content)
 
 header ($text)
 
 section ($label, $text, $nostrtoupper=false, $sH=false, $type=0, $allowHTMLinHeader=false)
 
 divider ($dist)
 
 spacer ($dist)
 
 sectionHeader ($label, $sH=false, $addAttrib= '')
 
 sectionBegin ()
 
 sectionEnd ()
 
 endPageJS ()
 
 docBodyTagBegin ()
 
 docStyle ()
 
 addStyleSheet ($key, $href, $title= '', $relation= 'stylesheet')
 
 addStyleSheetDirectory ($path)
 
 insertStylesAndJS ($content)
 
 getSkinStylesheetDirectories ()
 
 generator ()
 
 xUaCompatible ($content= 'IE=8')
 
 icons ($type, $styleAttribValue= '')
 
 t3Button ($onClick, $label)
 
 dfw ($string)
 
 rfw ($string)
 
 wrapInCData ($string)
 
 wrapScriptTags ($string, $linebreak=true)
 
 table ($data, $layout=null)
 
 menuTable ($arr1, $arr2=array(), $arr3=array())
 
 funcMenu ($content, $menu)
 
 loadJavascriptLib ($lib)
 
 getContextMenuCode ()
 
 getDragDropCode ($table, $additionalJavaScriptCode= '')
 
 getTabMenu ($mainParams, $elementName, $currentValue, $menuItems, $script= '', $addparams= '')
 
 getTabMenuRaw ($menuItems)
 
 getDynamicTabMenu (array $menuItems, $identString, $defaultTabIndex=1, $collapseable=false, $wrapContent=true, $storeLastActiveTab=true)
 
 getDynTabMenu ($menuItems, $identString, $toggle=0, $foldout=false, $noWrap=true, $fullWidth=false, $defaultTabIndex=1, $tabBehaviour=1)
 
 getDynTabMenuId ($identString)
 
 getVersionSelector ($id, $noAction=false)
 
 getHtmlTemplate ($filename)
 
 setModuleTemplate ($filename)
 
 moduleBody ($pageRecord=array(), $buttons=array(), $markerArray=array(), $subpartArray=array())
 

Public Attributes

 $form = ''
 
 $JScodeLibArray = array()
 
 $JScode = ''
 
 $extJScode = ''
 
 $JScodeArray
 
 $postCode = ''
 
 $docType = ''
 
 $moduleTemplate = ''
 
 $scriptID = ''
 
 $bodyTagId = ''
 
 $bodyTagAdditions = ''
 
 $inDocStyles = ''
 
 $inDocStylesArray = array()
 
 $form_largeComp = 1.33
 
 $endJS = 1
 
 $bgColor = '#F7F3EF'
 
 $bgColor2 = '#9BA1A8'
 
 $bgColor3 = '#F6F2E6'
 
 $bgColor4 = '#D9D5C9'
 
 $bgColor5 = '#ABBBB4'
 
 $bgColor6 = '#E7DBA8'
 
 $hoverColor = '#254D7B'
 
 $styleSheetFile = ''
 
 $styleSheetFile2 = ''
 
 $styleSheetFile_post = ''
 
 $backGroundImage = ''
 
 $inDocStyles_TBEstyle = ''
 
 $parseTimeFlag = false
 
 $sectionFlag = 0
 
 $divClass = ''
 
 $pageHeaderBlock = ''
 
 $endOfPageJsBlock = ''
 
 $hasDocheader = true
 
 $showFlashMessages = true
 
const STATUS_ICON_ERROR = 3
 
const STATUS_ICON_WARNING = 2
 
const STATUS_ICON_NOTIFICATION = 1
 
const STATUS_ICON_OK = -1
 
 $tableLayout
 
 $table_TR = '<tr>'
 
 $table_TABLE = '<table border="0" cellspacing="0" cellpadding="0" class="typo3-dblist" id="typo3-tmpltable">'
 

Protected Member Functions

 initPageRenderer ()
 
 getDocHeaderButtons ($buttons)
 
 getPagePath ($pageRecord)
 
 getPageInfo ($pageRecord)
 
 getBackendFavicon ()
 

Protected Attributes

 $moduleTemplateFilename = ''
 
 $useCompatibilityTag = true
 
 $xUaCompatibilityVersion = 'IE=edge'
 
 $stylesheetsCore
 
 $stylesheetsSkins
 
 $jsFiles = array()
 
 $jsFilesNoConcatenation = array()
 
 $charset = 'utf-8'
 
 $pageRenderer = null
 
 $pageHeaderFooterTemplateFile = ''
 
 $extDirectStateProvider = false
 
 $iconFactory
 
 $templateService
 

Detailed Description

TYPO3 Backend Template Class

This class contains functions for starting and ending the HTML of backend modules It also contains methods for outputting sections of content. Further there are functions for making icons, links, setting form-field widths etc. Color scheme and stylesheet definitions are also available here. Finally this file includes the language class for TYPO3's backend.

After this file $LANG and $TBE_TEMPLATE are global variables / instances of their respective classes.

Please refer to Inside TYPO3 for a discussion of how to use this API.

Definition at line 41 of file DocumentTemplate.php.

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

addStyleSheet (   $key,
  $href,
  $title = '',
  $relation = 'stylesheet' 
)

Insert additional style sheet link

Parameters
string$keysome key identifying the style sheet
string$hrefuri to the style sheet file
string$titlevalue for the title attribute of the link element
string$relationvalue for the rel attribute of the link element
Returns
void

Definition at line 1145 of file DocumentTemplate.php.

addStyleSheetDirectory (   $path)

Add all *.css files of the directory $path to the stylesheets

Parameters
string$pathdirectory to add
Returns
void

Definition at line 1156 of file DocumentTemplate.php.

References $GLOBALS, GeneralUtility\getFilesInDir(), GeneralUtility\getIndpEnv(), and GeneralUtility\resolveBackPath().

dfw (   $string)

Dimmed-fontwrap. Returns the string wrapped in a -tag defining the color to be gray/dimmed

Parameters
string$stringInput string
Returns
string Output string
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use proper HTML directly

Definition at line 1313 of file DocumentTemplate.php.

References GeneralUtility\logDeprecatedFunction().

divider (   $dist)

Inserts a divider image Ends a section (if open) before inserting the image

Parameters
int$distThe margin-top/-bottom of the
ruler.
Returns
string HTML content

Definition at line 984 of file DocumentTemplate.php.

References DocumentTemplate\sectionEnd().

docBodyTagBegin ( )

Creates the bodyTag. You can add to the bodyTag by $this->bodyTagAdditions

Returns
string HTML body tag

Definition at line 1102 of file DocumentTemplate.php.

Referenced by DocumentTemplate\startPage().

docStyle ( )

Outputting document style

Returns
string HTML style section/link tags

Definition at line 1112 of file DocumentTemplate.php.

References DocumentTemplate\$inDocStyles.

Referenced by DocumentTemplate\startPage().

endPage ( )

Returns page end; This includes finishing form, div, body and html tags.

Returns
string The HTML end of a page
See Also
startPage()

Definition at line 892 of file DocumentTemplate.php.

References GeneralUtility\devLog(), BackendUtility\getUpdateSignalCode(), DocumentTemplate\header(), DocumentTemplate\sectionEnd(), and DocumentTemplate\wrapScriptTags().

Referenced by DocumentTemplate\render().

endPageJS ( )

If a form-tag is defined in ->form then and end-tag for that <form> element is outputted Further a JavaScript section is outputted which will update the top.busy session-expiry object (unless $this->endJS is set to FALSE)

Returns
string HTML content (<script> tag section)
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, nothing there to output anymore

Definition at line 1090 of file DocumentTemplate.php.

References GeneralUtility\logDeprecatedFunction().

formatTime (   $tstamp,
  $type 
)

Returns a formatted string of $tstamp Uses $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] and $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] to format date and time

Parameters
int$tstampUNIX timestamp, seconds since 1970
int$typeHow much data to show: $type = 1: hhmm, $type = 10: ddmmmyy
Returns
string Formatted timestamp
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use the corresponding methods in BackendUtility

Definition at line 737 of file DocumentTemplate.php.

References $GLOBALS, and GeneralUtility\logDeprecatedFunction().

formWidth (   $size = 48,
  $textarea = false,
  $styleOverride = '' 
)

Returns <input> attributes to set the width of an text-type input field. For client browsers with no CSS support the cols/size attribute is returned. For CSS compliant browsers (recommended) a ' style="width: ...px;"' is returned.

Parameters
int$sizeA relative number which multiplied with approx. 10 will lead to the width in pixels
bool$textareaA flag you can set for textareas - DEPRECATED as there is no difference any more between the two
string$styleOverrideA string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled)
Returns
string Tag attributes for an <input> tag (regarding width)

Definition at line 700 of file DocumentTemplate.php.

funcMenu (   $content,
  $menu 
)

Returns a one-row/two-celled table with $content and $menu side by side. The table is a 100% width table and each cell is aligned left / right

Parameters
string$contentContent cell content (left)
string$menuMenu cell content (right)
Returns
string HTML output

Definition at line 1473 of file DocumentTemplate.php.

generator ( )

Returns generator meta tag

Returns
string <meta> tag with name "generator

Definition at line 1234 of file DocumentTemplate.php.

Referenced by DocumentTemplate\startPage().

getBackendFavicon ( )
protected

Retrieves configured favicon for backend (with fallback)

Returns
string

Definition at line 1994 of file DocumentTemplate.php.

References $GLOBALS.

Referenced by DocumentTemplate\startPage().

getContextMenuCode ( )

Includes the necessary Javascript function for the clickmenu (context sensitive menus) in the document

Returns
void

Definition at line 1501 of file DocumentTemplate.php.

getDocHeaderButtons (   $buttons)
protected

Fill the button lists with the defined HTML

Parameters
array$buttonsHTML for all buttons
Returns
array Containing HTML for both buttonlists

Definition at line 1817 of file DocumentTemplate.php.

References $GLOBALS, and GeneralUtility\callUserFunction().

Referenced by DocumentTemplate\moduleBody().

getDragDropCode (   $table,
  $additionalJavaScriptCode = '' 
)

Includes the necessary javascript file for use on pages which have the drag and drop functionality (legacy folder tree)

Parameters
string$tableindicator of which table the drag and drop function should work on (pages or folders)
string$additionalJavaScriptCodeadds more code to the additional javascript code
Returns
void

Definition at line 1515 of file DocumentTemplate.php.

getDynamicTabMenu ( array  $menuItems,
  $identString,
  $defaultTabIndex = 1,
  $collapseable = false,
  $wrapContent = true,
  $storeLastActiveTab = true 
)

Creates a DYNAMIC tab-menu where the tabs or collapseable are rendered with bootstrap markup

Parameters
array$menuItemsNumeric array where each entry is an array in itself with associative keys: "label" contains the label for the TAB, "content" contains the HTML content that goes into the div-layer of the tabs content. "description" contains description text to be shown in the layer. "linkTitle" is short text for the title attribute of the tab-menu link (mouse-over text of tab). "stateIcon" indicates a standard status icon (see ->icon(), values: -1, 1, 2, 3). "icon" is an image tag placed before the text.
string$identStringIdentification string. This should be unique for every instance of a dynamic menu!
int$defaultTabIndexDefault tab to open (for toggle <=0). Value corresponds to integer-array index + 1 (index zero is "1", index "1" is 2 etc.). A value of zero (or something non-existing) will result in no default tab open.
bool$collapseableIf set, the tabs are rendered as headers instead over each sheet. Effectively this means there is no tab menu, but rather a foldout/foldin menu.
bool$wrapContentIf set, the content is wrapped in div structure which provides a padding and border style. Set this FALSE to get unstyled content pane with fullsize content area.
bool$storeLastActiveTabIf set, the last open tab is stored in local storage and will be re-open again. If you don't need this feature, e.g. for wizards like import/export you can disable this behaviour.
Returns
string
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Use getDynamicTabMenu() from ModuleTemplate instead.

Definition at line 1601 of file DocumentTemplate.php.

References $GLOBALS, GeneralUtility\getFileAbsFileName(), GeneralUtility\logDeprecatedFunction(), GeneralUtility\makeInstance(), and GeneralUtility\shortMD5().

Referenced by DocumentTemplate\getDynTabMenu().

getDynTabMenu (   $menuItems,
  $identString,
  $toggle = 0,
  $foldout = false,
  $noWrap = true,
  $fullWidth = false,
  $defaultTabIndex = 1,
  $tabBehaviour = 1 
)

Creates a DYNAMIC tab-menu where the tabs are switched between with DHTML. Should work in MSIE, Mozilla, Opera and Konqueror. On Konqueror I did find a serious problem: <textarea> fields loose their content when you switch tabs!

Parameters
array$menuItemsNumeric array where each entry is an array in itself with associative keys: "label" contains the label for the TAB, "content" contains the HTML content that goes into the div-layer of the tabs content. "description" contains description text to be shown in the layer. "linkTitle" is short text for the title attribute of the tab-menu link (mouse-over text of tab). "stateIcon" indicates a standard status icon (see ->icon(), values: -1, 1, 2, 3). "icon" is an image tag placed before the text.
string$identStringIdentification string. This should be unique for every instance of a dynamic menu!
int$toggleIf "1", then enabling one tab does not hide the others - they simply toggles each sheet on/off. This makes most sense together with the $foldout option. If "-1" then it acts normally where only one tab can be active at a time BUT you can click a tab and it will close so you have no active tabs.
bool$foldoutIf set, the tabs are rendered as headers instead over each sheet. Effectively this means there is no tab menu, but rather a foldout/foldin menu. Make sure to set $toggle as well for this option.
bool$noWrapDeprecated - delivered by CSS
bool$fullWidthIf set, the tabs will span the full width of their position
int$defaultTabIndexDefault tab to open (for toggle <=0). Value corresponds to integer-array index + 1 (index zero is "1", index "1" is 2 etc.). A value of zero (or something non-existing) will result in no default tab open.
int$tabBehaviourIf set to '1' empty tabs will be remove, If set to '2' empty tabs will be disabled. setting this option to '2' is deprecated since TYPO3 CMS 7, and will be removed iwth CMS 8
Returns
string JavaScript section for the HTML header.
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 1634 of file DocumentTemplate.php.

References DocumentTemplate\getDynamicTabMenu(), and GeneralUtility\logDeprecatedFunction().

getDynTabMenuId (   $identString)

Creates the id for dynTabMenus.

Parameters
string$identStringIdentification string. This should be unique for every instance of a dynamic menu!
Returns
string The id with a short MD5 of $identString and prefixed "DTM-", like "DTM-2e8791854a
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 1647 of file DocumentTemplate.php.

References GeneralUtility\logDeprecatedFunction(), and GeneralUtility\shortMD5().

getHeader (   $table,
  $row,
  $path,
  $noViewPageIcon = false,
  $tWrap = array('', ''),
  $enableClickMenu = true 
)

Makes the header (icon+title) for a page (or other record). Used in most modules under Web>* $table and $row must be a tablename/record from that table $path will be shown as alt-text for the icon. The title will be truncated to 45 chars.

Parameters
string$tableTable name
array$rowRecord row
string$pathAlt text
bool$noViewPageIconSet $noViewPageIcon TRUE if you don't want a magnifier-icon for viewing the page in the frontend
array$tWrapis an array with indexes 0 and 1 each representing HTML-tags (start/end) which will wrap the title
bool$enableClickMenuIf TRUE, render click menu code around icon image
Returns
string HTML content

Definition at line 580 of file DocumentTemplate.php.

References $GLOBALS, GeneralUtility\fixed_lgd_cs(), BackendUtility\getRecordTitle(), Icon\SIZE_SMALL, DocumentTemplate\viewPageIcon(), and BackendUtility\wrapClickMenuOnIcon().

getHtmlTemplate (   $filename)

Function to load a HTML template file with markers. When calling from own extension, use syntax getHtmlTemplate('EXT:extkey/template.html')

Parameters
string$filenametmpl name, usually in the typo3/template/ directory
Returns
string HTML of template

Definition at line 1680 of file DocumentTemplate.php.

References $filename, $GLOBALS, elseif, GeneralUtility\getFileAbsFileName(), GeneralUtility\getUrl(), GeneralUtility\isAbsPath(), GeneralUtility\isAllowedAbsPath(), GeneralUtility\isFirstPartOfStr(), and GeneralUtility\resolveBackPath().

Referenced by DocumentTemplate\setModuleTemplate().

getPageInfo (   $pageRecord)
protected

Setting page icon with clickmenu + uid for docheader

Parameters
array$pageRecordCurrent page
Returns
string Page info

Definition at line 1896 of file DocumentTemplate.php.

References $GLOBALS, BackendUtility\getRecordIconAltText(), BackendUtility\getRecordTitle(), Icon\SIZE_SMALL, and BackendUtility\wrapClickMenuOnIcon().

Referenced by DocumentTemplate\moduleBody().

getPagePath (   $pageRecord)
protected

Generate the page path for docheader

Parameters
array$pageRecordCurrent page
Returns
string Page path

Definition at line 1863 of file DocumentTemplate.php.

References $GLOBALS, and GeneralUtility\fixed_lgd_cs().

Referenced by DocumentTemplate\moduleBody().

getPageRenderer ( )

Gets instance of PageRenderer configured with the current language, file references and debug settings

Returns
PageRenderer
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8.

Definition at line 483 of file DocumentTemplate.php.

References DocumentTemplate\$pageRenderer, DocumentTemplate\initPageRenderer(), and GeneralUtility\logDeprecatedFunction().

getResourceHeader ( \TYPO3\CMS\Core\Resource\ResourceInterface  $resource,
  $tWrap = array('', ''),
  $enableClickMenu = true 
)

Like ->getHeader() but for files and folders Returns the icon with the path of the file/folder set in the alt/title attribute. Shows the name after the icon.

Parameters
\TYPO3\CMS\Core\Resource\ResourceInterface$resource
array$tWrapis an array with indexes 0 and 1 each representing HTML-tags (start/end) which will wrap the title
bool$enableClickMenuIf TRUE, render click menu code around icon image
Returns
string

Definition at line 608 of file DocumentTemplate.php.

References GeneralUtility\fixed_lgd_cs(), Icon\SIZE_SMALL, and BackendUtility\wrapClickMenuOnIcon().

getSkinStylesheetDirectories ( )

Returns an array of all stylesheet directories belonging to core and skins

Returns
array Stylesheet directories

Definition at line 1193 of file DocumentTemplate.php.

References $GLOBALS, DocumentTemplate\$stylesheetsSkins, ExtensionManagementUtility\extRelPath(), and ExtensionManagementUtility\isLoaded().

Referenced by DocumentTemplate\__construct().

getTabMenu (   $mainParams,
  $elementName,
  $currentValue,
  $menuItems,
  $script = '',
  $addparams = '' 
)

Creates a tab menu from an array definition

Returns a tab menu for a module Requires the JS function jumpToUrl() to be available

Parameters
mixed$mainParamsis the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
string$elementNameit the form elements name, probably something like "SET[...]
string$currentValueis the value to be selected currently.
array$menuItemsis an array with the menu items for the selector box
string$scriptis the script to send the &id to, if empty it's automatically found
string$addparamsis additional parameters to pass to the script.
Returns
string HTML code for tab menu

Definition at line 1537 of file DocumentTemplate.php.

References DocumentTemplate\getTabMenuRaw(), and GeneralUtility\implodeArrayForUrl().

getTabMenuRaw (   $menuItems)

Creates the HTML content for the tab menu

Parameters
array$menuItemsMenu items for tabs
Returns
string Table HTML private

Definition at line 1566 of file DocumentTemplate.php.

References $url.

Referenced by DocumentTemplate\getTabMenu().

getVersionSelector (   $id,
  $noAction = false 
)

Creates the version selector for the page id inputted. Requires the core version management extension, "version" to be loaded.

Parameters
int$idPage id to create selector for.
bool$noActionIf set, there will be no button for swapping page.
Returns
string

Definition at line 1662 of file DocumentTemplate.php.

References ExtensionManagementUtility\isLoaded(), and GeneralUtility\makeInstance().

header (   $text)

Returns the header-bar in the top of most backend modules Closes section if open.

Parameters
string$textThe text string for the header
Returns
string HTML content

Definition at line 937 of file DocumentTemplate.php.

References DocumentTemplate\sectionEnd().

Referenced by DocumentTemplate\endPage(), and DocumentTemplate\startPage().

icons (   $type,
  $styleAttribValue = '' 
)

Returns an image-tag with an 18x16 icon of the following types:

$type: -1: OK icon (Check-mark) 1: Notice (Speach-bubble) 2: Warning (Yellow triangle) 3: Fatal error (Red stop sign)

Parameters
int$typeSee description
string$styleAttribValueValue for style attribute
Returns
string HTML image tag (if applicable)

Definition at line 1270 of file DocumentTemplate.php.

References Icon\SIZE_SMALL.

Referenced by DocumentTemplate\section().

initPageRenderer ( )
protected

Initializes the page renderer object

Definition at line 447 of file DocumentTemplate.php.

References $GLOBALS, and GeneralUtility\makeInstance().

Referenced by DocumentTemplate\__construct(), and DocumentTemplate\getPageRenderer().

insertStylesAndJS (   $content)

Insert post rendering document style into already rendered content This is needed for extobjbase

Parameters
string$contentstyle-content to insert.
Returns
string content with inserted styles

Definition at line 1177 of file DocumentTemplate.php.

References DocumentTemplate\wrapScriptTags().

Referenced by DocumentTemplate\render().

issueCommand (   $params,
  $redirectUrl = '' 
)

Returns a URL with a command to TYPO3 Core Engine (tce_db.php) See description of the API elsewhere.

Parameters
string$paramsis a set of GET params to send to tce_db.php. Example: "&cmd[tt_content][123][move]=456" or "&data[tt_content][123][hidden]=1&data[tt_content][123][title]=Hello%20World
string | int$redirectUrlRedirect URL, default is to use GeneralUtility::getIndpEnv('REQUEST_URI'), -1 means to generate an URL for JavaScript using T3_THIS_LOCATION
Returns
string URL to BackendUtility::getModuleUrl('tce_db') + parameters
See Also
::editOnClick()
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use BackendUtility::getLinkToDataHandlerAction() instead

Definition at line 560 of file DocumentTemplate.php.

References BackendUtility\getLinkToDataHandlerAction(), and GeneralUtility\logDeprecatedFunction().

loadJavascriptLib (   $lib)

Includes a javascript library that exists in the core /typo3/ directory

Parameters
string$lib,:Library name. Call it with the full path like "sysext/core/Resources/Public/JavaScript/QueryGenerator.js" to load it
Returns
void

Definition at line 1490 of file DocumentTemplate.php.

makeShortcutIcon (   $gvList,
  $setList,
  $modName,
  $motherModName = '',
  $classes = '' 
)

Returns a linked shortcut-icon which will call the shortcut frame and set a shortcut there back to the calling page/module

Parameters
string$gvListIs the list of GET variables to store (if any)
string$setListIs the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules
string$modNameModule name string
string | int$motherModNameIs used to enter the "parent module name" if the module is a submodule under eg. Web>* or File>*. You can also set this value to 1 in which case the currentLoadedModule is sent to the shortcut script (so - not a fixed value!) - that is used in file_edit and wizard_rte modules where those are really running as a part of another module.
string$classes
Returns
string HTML content

Definition at line 635 of file DocumentTemplate.php.

References $GLOBALS, $url, GeneralUtility\_GET(), elseif, GeneralUtility\getIndpEnv(), DocumentTemplate\makeShortcutUrl(), GeneralUtility\quoteJSvalue(), BackendUtility\shortcutExists(), and Icon\SIZE_SMALL.

makeShortcutUrl (   $gvList,
  $setList 
)

MAKE url for storing Internal func

Parameters
string$gvListIs the list of GET variables to store (if any)
string$setListIs the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules
Returns
string private
See Also
makeShortcutIcon()

Definition at line 682 of file DocumentTemplate.php.

References $GLOBALS, GeneralUtility\_GET(), GeneralUtility\compileSelectedGetVarsFromArray(), and GeneralUtility\implodeArrayForUrl().

Referenced by DocumentTemplate\makeShortcutIcon().

menuTable (   $arr1,
  $arr2 = array(),
  $arr3 = array() 
)

Constructs a table with content from the $arr1, $arr2 and $arr3.

Parameters
array$arr1Menu elements on first level
array$arr2Secondary items
array$arr3Third-level items
Returns
string HTML content,
..
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 1439 of file DocumentTemplate.php.

References GeneralUtility\logDeprecatedFunction().

moduleBody (   $pageRecord = array(),
  $buttons = array(),
  $markerArray = array(),
  $subpartArray = array() 
)

Put together the various elements for the module <body> using a static HTML template

Parameters
array$pageRecordRecord of the current page, used for page path and info
array$buttonsHTML for all buttons
array$markerArrayHTML for all other markers
array$subpartArrayHTML for the subparts
Returns
string Composite HTML

Definition at line 1722 of file DocumentTemplate.php.

References $GLOBALS, GeneralUtility\callUserFunction(), DocumentTemplate\getDocHeaderButtons(), DocumentTemplate\getPageInfo(), and DocumentTemplate\getPagePath().

parseTime ( )

Returns script parsetime IF ->parseTimeFlag is set and user is "admin" Automatically outputted in page end

Returns
string HTML formated with

-tags

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 759 of file DocumentTemplate.php.

References $GLOBALS, GeneralUtility\getIndpEnv(), GeneralUtility\logDeprecatedFunction(), and GeneralUtility\milliseconds().

redirectUrls (   $thisLocation = '')

Returns JavaScript variables setting the returnUrl and thisScript location for use by JavaScript on the page. Used in fx. db_list.php (Web>List)

Parameters
string$thisLocationURL to "this location" / current script
Returns
string Urls are returned as JavaScript variables T3_RETURN_URL and T3_THIS_LOCATION
See Also
typo3/db_list.php

Definition at line 713 of file DocumentTemplate.php.

References GeneralUtility\_GP(), GeneralUtility\linkThisScript(), GeneralUtility\quoteJSvalue(), and GeneralUtility\sanitizeLocalUrl().

render (   $title,
  $content 
)

Shortcut for render the complete page of a module

Parameters
string$titlepage title
string$contentpage content
Returns
string complete page

Definition at line 922 of file DocumentTemplate.php.

References DocumentTemplate\endPage(), DocumentTemplate\insertStylesAndJS(), and DocumentTemplate\startPage().

rfw (   $string)

red-fontwrap. Returns the string wrapped in a -tag defining the color to be red

Parameters
string$stringInput string
Returns
string Output string
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use proper HTML directly

Definition at line 1326 of file DocumentTemplate.php.

References GeneralUtility\logDeprecatedFunction().

section (   $label,
  $text,
  $nostrtoupper = false,
  $sH = false,
  $type = 0,
  $allowHTMLinHeader = false 
)

Begins an output section and sets header and content

Parameters
string$labelThe header
string$textThe HTML-content
bool$nostrtoupperA flag that will prevent the header from being converted to uppercase
bool$sHDefines the type of header (if set, "<h3>" rather than the default "h4")
int$typeThe number of an icon to show with the header (see the icon-function). -1,1,2,3
bool$allowHTMLinHeaderIf set, HTML tags are allowed in $label (otherwise this value is by default htmlspecialchars()'ed)
Returns
string HTML content
See Also
icons(), sectionHeader()

Definition at line 959 of file DocumentTemplate.php.

References DocumentTemplate\icons(), DocumentTemplate\sectionBegin(), and DocumentTemplate\sectionHeader().

sectionBegin ( )

Begins an output section. Returns the

-begin tag AND sets the ->sectionFlag TRUE (if the ->sectionFlag is not already set!) You can call this function even if a section is already begun since the function will only return something if the sectionFlag is not already set!
Returns
string HTML content

Definition at line 1044 of file DocumentTemplate.php.

Referenced by DocumentTemplate\section(), and DocumentTemplate\sectionHeader().

sectionEnd ( )

Ends and output section Returns the -end tag AND clears the ->sectionFlag (but does so only IF the sectionFlag is set - that is a section is 'open') See sectionBegin() also.

Returns
string HTML content

Definition at line 1068 of file DocumentTemplate.php.

Referenced by DocumentTemplate\divider(), DocumentTemplate\endPage(), and DocumentTemplate\header().

sectionHeader (   $label,
  $sH = false,
  $addAttrib = '' 
)

Make a section header. Begins a section if not already open.

Parameters
string$labelThe label between the

or tags. (Allows HTML) bool $sH If set, is used, otherwise string $addAttrib Additional attributes to h-tag, eg. ' class=""' string HTML content

Definition at line 1023 of file DocumentTemplate.php.

References DocumentTemplate\sectionBegin().

Referenced by DocumentTemplate\section().

setExtDirectStateProvider ( )

Sets inclusion of StateProvider

Returns
void

Definition at line 496 of file DocumentTemplate.php.

setModuleTemplate (   $filename)

Define the template for the module

Parameters
string$filenamefilename
Returns
void

Definition at line 1707 of file DocumentTemplate.php.

References $filename, and DocumentTemplate\getHtmlTemplate().

spacer (   $dist)

Returns a blank

-section with a height
Parameters
int$distPadding-top for the div-section (should be margin-top but konqueror (3.1) doesn't like it :-(
Returns
string HTML content
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 1002 of file DocumentTemplate.php.

References GeneralUtility\logDeprecatedFunction().

startPage (   $title)

Returns page start This includes the proper header with charset, title, meta tag and beginning body-tag.

Parameters
string$titleHTML Page title for the header
Returns
string Returns the whole header section of a HTML-document based on settings in internal variables (like styles, javascript code, charset, generator and docType)
See Also
endPage()

Definition at line 793 of file DocumentTemplate.php.

References $GLOBALS, GeneralUtility\callUserFunction(), GeneralUtility\deprecationLog(), DocumentTemplate\docBodyTagBegin(), DocumentTemplate\docStyle(), DocumentTemplate\generator(), DocumentTemplate\getBackendFavicon(), GeneralUtility\getFileAbsFileName(), DocumentTemplate\header(), PageRenderer\PART_FOOTER, PageRenderer\PART_HEADER, DocumentTemplate\useCompatibilityTag(), and DocumentTemplate\xUaCompatible().

Referenced by DocumentTemplate\render().

t3Button (   $onClick,
  $label 
)

Returns an <input> button with the $onClick action and $label

Parameters
string$onClickThe value of the onclick attribute of the input tag (submit type)
string$labelThe label for the button (which will be htmlspecialchar'ed)
Returns
string A <input> tag of the type "submit

Definition at line 1300 of file DocumentTemplate.php.

table (   $data,
  $layout = null 
)

Returns a table based on the input $data

Parameters
array$dataMultidim array with first levels = rows, second levels = cells
array$layoutIf set, then this provides an alternative layout array instead of $this->tableLayout
Returns
string The HTML table.

Definition at line 1394 of file DocumentTemplate.php.

References DocumentTemplate\$tableLayout, and GeneralUtility\logDeprecatedFunction().

useCompatibilityTag (   $useCompatibilityTag = true)

Defines whether to use the X-UA-Compatible meta tag.

Parameters
bool$useCompatibilityTagWhether to use the tag
Returns
void

Definition at line 774 of file DocumentTemplate.php.

References DocumentTemplate\$useCompatibilityTag.

Referenced by DocumentTemplate\startPage().

viewPageIcon (   $id,
  $_ = '' 
)

Makes link to page $id in frontend (view page) Returns an icon which links to the frontend index.php document for viewing the page with id $id $id must be a page-uid If the BE_USER has access to Web>List then a link to that module is shown as well (with return-url)

Parameters
int$idThe page id
string$_,\xrefitemdeprecated 63.
Returns
string HTML string with linked icon(s)

Definition at line 538 of file DocumentTemplate.php.

References $GLOBALS, BackendUtility\BEgetRootLine(), GeneralUtility\getIndpEnv(), Icon\SIZE_SMALL, and BackendUtility\viewOnClick().

Referenced by DocumentTemplate\getHeader().

wrapClickMenuOnIcon (   $content,
  $table,
  $uid = 0,
  $listFr = true,
  $addParams = '',
  $enDisItems = '',
  $returnTagParameters = false 
)

Makes click menu link (context sensitive menu) Returns $str (possibly an <|img> tag/icon) wrapped in a link which will activate the context sensitive menu for the record ($table/$uid) or file ($table = file) The link will load the top frame with the parameter "&item" which is the table,uid and listFr arguments imploded by "|": rawurlencode($table.'|'.$uid.'|'.$listFr)

Parameters
string$strString to be wrapped in link, typ. image tag.
string$tableTable name/File path. If the icon is for a database record, enter the tablename from $GLOBALS['TCA']. If a file then enter the absolute filepath
int$uidIf icon is for database record this is the UID for the record from $table
bool$listFrTells the top frame script that the link is coming from a "list" frame which means a frame from within the backend content frame.
string$addParamsAdditional GET parameters for the link to the ClickMenu AJAX request
string$enDisItemsEnable / Disable click menu items. Example: "+new,view" will display ONLY these two items (and any spacers in between), "new,view" will display all BUT these two items.
bool$returnTagParametersIf set, will return only the onclick JavaScript, not the whole link.
Returns
string The link-wrapped input string.
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use BackendUtility::wrapClickMenuOnIcon() instead

Definition at line 522 of file DocumentTemplate.php.

References GeneralUtility\logDeprecatedFunction(), and BackendUtility\wrapClickMenuOnIcon().

wrapInCData (   $string)

Returns string wrapped in CDATA "tags" for XML / XHTML (wrap content of <script> and <style> sections in those!)

Parameters
string$stringInput string
Returns
string Output string

Definition at line 1338 of file DocumentTemplate.php.

wrapScriptTags (   $string,
  $linebreak = true 
)

Wraps the input string in script tags. Automatic re-identing of the JS code is done by using the first line as ident reference. This is nice for identing JS code with PHP code on the same level.

Parameters
string$stringInput string
bool$linebreakWrap script element in linebreaks? Default is TRUE.
Returns
string Output string

Definition at line 1353 of file DocumentTemplate.php.

Referenced by DocumentTemplate\endPage(), and DocumentTemplate\insertStylesAndJS().

xUaCompatible (   $content = 'IE=8')

Returns X-UA-Compatible meta tag

Parameters
string$contentContent of the compatible tag (default: IE-8)
Returns
string <meta http-equiv="X-UA-Compatible" content="???">

Definition at line 1246 of file DocumentTemplate.php.

Referenced by DocumentTemplate\startPage().

Member Data Documentation

$backGroundImage = ''

Definition at line 242 of file DocumentTemplate.php.

$bgColor = '#F7F3EF'

Light background color

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 173 of file DocumentTemplate.php.

$bgColor2 = '#9BA1A8'

Steel-blue

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 180 of file DocumentTemplate.php.

$bgColor3 = '#F6F2E6'

dok.color

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 187 of file DocumentTemplate.php.

$bgColor4 = '#D9D5C9'

light tablerow background, brownish

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 194 of file DocumentTemplate.php.

$bgColor5 = '#ABBBB4'

light tablerow background, greenish

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 201 of file DocumentTemplate.php.

$bgColor6 = '#E7DBA8'

light tablerow background, yellowish, for section headers. Light.

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 208 of file DocumentTemplate.php.

$bodyTagAdditions = ''

Definition at line 133 of file DocumentTemplate.php.

$bodyTagId = ''

Definition at line 126 of file DocumentTemplate.php.

$charset = 'utf-8'
protected

Definition at line 315 of file DocumentTemplate.php.

$divClass = ''

Definition at line 330 of file DocumentTemplate.php.

$docType = ''

Doc-type used in the header. Default is xhtml_trans. You can also set it to 'html_3', 'xhtml_strict' or 'xhtml_frames'.

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, as it is HTML5

Definition at line 98 of file DocumentTemplate.php.

$endJS = 1

Definition at line 163 of file DocumentTemplate.php.

$endOfPageJsBlock = ''

Definition at line 340 of file DocumentTemplate.php.

$extDirectStateProvider = false
protected

Definition at line 362 of file DocumentTemplate.php.

$extJScode = ''

Definition at line 73 of file DocumentTemplate.php.

$form = ''

Definition at line 50 of file DocumentTemplate.php.

$form_largeComp = 1.33

Definition at line 155 of file DocumentTemplate.php.

$hasDocheader = true

Definition at line 345 of file DocumentTemplate.php.

$hoverColor = '#254D7B'
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 213 of file DocumentTemplate.php.

$iconFactory
protected

Definition at line 374 of file DocumentTemplate.php.

$inDocStyles = ''

Additional CSS styles which will be added to the <style> section in the header

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use the pageRenderer property for adding CSS styles

Definition at line 140 of file DocumentTemplate.php.

Referenced by DocumentTemplate\docStyle().

$inDocStyles_TBEstyle = ''

Definition at line 250 of file DocumentTemplate.php.

$inDocStylesArray = array()

Definition at line 148 of file DocumentTemplate.php.

$JScode = ''

Definition at line 66 of file DocumentTemplate.php.

$JScodeArray
Initial value:
= array('jumpToUrl' => '
function jumpToUrl(URL) {
window.location.href = URL;
return false;
}
')

Definition at line 80 of file DocumentTemplate.php.

$JScodeLibArray = array()

Similar to $JScode (see below) but used as an associative array to prevent double inclusion of JS code. This is used to include certain external Javascript libraries before the inline JS code. <script>-Tags are not wrapped around automatically

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use pageRenderer directly

Definition at line 59 of file DocumentTemplate.php.

$jsFiles = array()
protected

Definition at line 291 of file DocumentTemplate.php.

$jsFilesNoConcatenation = array()
protected

Definition at line 298 of file DocumentTemplate.php.

$moduleTemplate = ''

Definition at line 105 of file DocumentTemplate.php.

$moduleTemplateFilename = ''
protected

Definition at line 112 of file DocumentTemplate.php.

$pageHeaderBlock = ''

Definition at line 335 of file DocumentTemplate.php.

$pageHeaderFooterTemplateFile = ''
protected

Definition at line 357 of file DocumentTemplate.php.

$pageRenderer = null
protected

Definition at line 350 of file DocumentTemplate.php.

Referenced by DocumentTemplate\getPageRenderer().

$parseTimeFlag = false

Definition at line 307 of file DocumentTemplate.php.

$postCode = ''

Definition at line 92 of file DocumentTemplate.php.

$scriptID = ''

Definition at line 119 of file DocumentTemplate.php.

Referenced by DocumentTemplate\__construct().

$sectionFlag = 0

Definition at line 323 of file DocumentTemplate.php.

bool $showFlashMessages = true

Whether flashmessages should be rendered or not

Definition at line 369 of file DocumentTemplate.php.

$styleSheetFile = ''

Definition at line 220 of file DocumentTemplate.php.

$styleSheetFile2 = ''

Definition at line 227 of file DocumentTemplate.php.

$styleSheetFile_post = ''

Definition at line 234 of file DocumentTemplate.php.

$stylesheetsCore
protected
Initial value:
= array(
'generatedSprites' => '../typo3temp/sprites/'
)

Definition at line 272 of file DocumentTemplate.php.

$stylesheetsSkins
protected
Initial value:
= array(
'structure' => 'Resources/Public/Css/structure/',
'visual' => 'Resources/Public/Css/visual/'
)

Definition at line 281 of file DocumentTemplate.php.

Referenced by DocumentTemplate\getSkinStylesheetDirectories().

$table_TABLE = '<table border="0" cellspacing="0" cellpadding="0" class="typo3-dblist" id="typo3-tmpltable">'

Definition at line 1383 of file DocumentTemplate.php.

$table_TR = '<tr>'

Definition at line 1381 of file DocumentTemplate.php.

$tableLayout
Initial value:
= array(
'defRow' => array(
'defCol' => array('<td valign="top">', '</td>')
)
)

Definition at line 1375 of file DocumentTemplate.php.

Referenced by DocumentTemplate\table().

$templateService
protected

Definition at line 379 of file DocumentTemplate.php.

$useCompatibilityTag = true
protected

Definition at line 257 of file DocumentTemplate.php.

Referenced by DocumentTemplate\useCompatibilityTag().

$xUaCompatibilityVersion = 'IE=edge'
protected

Definition at line 264 of file DocumentTemplate.php.

const STATUS_ICON_ERROR = 3

Definition at line 381 of file DocumentTemplate.php.

Referenced by ErrorIconViewHelper\renderStatic().

const STATUS_ICON_NOTIFICATION = 1

Definition at line 383 of file DocumentTemplate.php.

const STATUS_ICON_OK = -1

Definition at line 384 of file DocumentTemplate.php.

const STATUS_ICON_WARNING = 2

Definition at line 382 of file DocumentTemplate.php.

Referenced by ErrorIconViewHelper\renderStatic().