Documentation TYPO3 par Ameos |
Public Member Functions | |
template () | |
wrapClickMenuOnIcon ($str, $table, $uid='', $listFr=1, $addParams='', $enDisItems='', $returnOnClick=FALSE) | |
viewPageIcon ($id, $backPath, $addParams='hspace="3"') | |
issueCommand ($params, $rUrl='') | |
isCMlayers () | |
thisBlur () | |
helpStyle () | |
getHeader ($table, $row, $path, $noViewPageIcon=0, $tWrap=array('','')) | |
getFileheader ($title, $path, $iconfile) | |
makeShortcutIcon ($gvList, $setList, $modName, $motherModName="") | |
makeShortcutUrl ($gvList, $setList) | |
formWidth ($size=48, $textarea=0, $styleOverride='') | |
formWidthText ($size=48, $styleOverride='', $wrap='') | |
redirectUrls ($thisLocation='') | |
formatTime ($tstamp, $type) | |
parseTime () | |
startPage ($title) | |
endPage () | |
header ($text) | |
section ($label, $text, $nostrtoupper=FALSE, $sH=FALSE, $type=0, $allowHTMLinHeader=FALSE) | |
divider ($dist) | |
spacer ($dist) | |
sectionHeader ($label, $sH=FALSE, $addAttrib='') | |
sectionBegin () | |
sectionEnd () | |
middle () | |
endPageJS () | |
docBodyTagBegin () | |
docStyle () | |
insertStylesAndJS ($content) | |
initCharset () | |
generator () | |
icons ($type, $styleAttribValue='') | |
t3Button ($onClick, $label) | |
dfw ($string) | |
rfw ($string) | |
wrapInCData ($string) | |
wrapScriptTags ($string, $linebreak=TRUE) | |
table ($arr, $layout='') | |
menuTable ($arr1, $arr2=array(), $arr3=array()) | |
funcMenu ($content, $menu) | |
clearCacheMenu ($id, $addSaveOptions=0) | |
getContextMenuCode () | |
getDragDropCode ($table) | |
getTabMenu ($mainParams, $elementName, $currentValue, $menuItems, $script='', $addparams='') | |
getTabMenuRaw ($menuItems) | |
getDynTabMenu ($menuItems, $identString, $toggle=0, $foldout=FALSE, $newRowCharLimit=50, $noWrap=1, $fullWidth=FALSE, $defaultTabIndex=1) | |
getDynTabMenuId ($identString) | |
getDynTabMenuJScode () | |
getVersionSelector ($id, $noAction=FALSE) | |
Public Attributes | |
$backPath = '' | |
$form = '' | |
$JScode = '' | |
$JScodeArray = array() | |
$postCode = '' | |
$docType = '' | |
$scriptID = '' | |
$bodyTagId = '' | |
$bodyTagAdditions = '' | |
$inDocStyles = '' | |
$inDocStylesArray = array() | |
$form_rowsToStylewidth = 9.58 | |
$form_largeComp = 1.33 | |
$endJS = 1 | |
$bgColor = '#F7F3EF' | |
$bgColor2 = '#9BA1A8' | |
$bgColor3 = '#F6F2E6' | |
$bgColor4 = '#D9D5C9' | |
$bgColor5 = '#ABBBB4' | |
$bgColor6 = '#E7DBA8' | |
$hoverColor = '#254D7B' | |
$styleSheetFile = 'stylesheet.css' | |
$styleSheetFile2 = '' | |
$styleSheetFile_post = '' | |
$backGroundImage = '' | |
$inDocStyles_TBEstyle = '' | |
$parseTimeFlag = 0 | |
$charset = 'iso-8859-1' | |
$sectionFlag = 0 | |
$divClass = '' | |
$tableLayout | |
$table_TR = '<tr>' | |
$table_TABLE = '<table border="0" cellspacing="0" cellpadding="0" id="typo3-tmpltable">' |
Definition at line 169 of file template.php.
template::template | ( | ) |
Constructor Imports relevant parts from global $TBE_STYLES (colorscheme)
Definition at line 224 of file template.php.
References t3lib_div::array_merge_recursive_overrule().
template::wrapClickMenuOnIcon | ( | $ | str, | |
$ | table, | |||
$ | uid = '' , |
|||
$ | listFr = 1 , |
|||
$ | addParams = '' , |
|||
$ | enDisItems = '' , |
|||
$ | returnOnClick = 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)
string | String to be wrapped in link, typ. image tag. | |
string | Table name/File path. If the icon is for a database record, enter the tablename from $TCA. If a file then enter the absolute filepath | |
integer | If icon is for database record this is the UID for the record from $table | |
boolean | Tells the top frame script that the link is coming from a "list" frame which means a frame from within the backend content frame. | |
string | Additional GET parameters for the link to alt_clickmenu.php | |
string | Enable / 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. | |
boolean | If set, will return only the onclick JavaScript, not the whole link. |
Definition at line 298 of file template.php.
References $backPath, and t3lib_div::shortMD5().
template::viewPageIcon | ( | $ | id, | |
$ | backPath, | |||
$ | addParams = 'hspace="3"' | |||
) |
Makes link to page $id in frontend (view page) Returns an magnifier-glass 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)
integer | The page id | |
string | The current "BACK_PATH" (the back relative to the typo3/ directory) | |
string | Additional parameters for the image tag(s) |
Definition at line 315 of file template.php.
References $backPath, and t3lib_div::getIndpEnv().
Referenced by getHeader().
template::issueCommand | ( | $ | params, | |
$ | rUrl = '' | |||
) |
Returns a URL with a command to TYPO3 Core Engine (tce_db.php) See description of the API elsewhere.
string | $params is 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 | Redirect URL if any other that t3lib_div::getIndpEnv('REQUEST_URI') is wished |
Definition at line 341 of file template.php.
References t3lib_div::getIndpEnv().
template::isCMlayers | ( | ) |
Returns true if click-menu layers can be displayed for the current user/browser Use this to test if click-menus (context sensitive menus) can and should be displayed in the backend.
Definition at line 356 of file template.php.
template::thisBlur | ( | ) |
Returns 'this.blur();' if the client supports CSS styles Use this in links to remove the underlining after being clicked
Definition at line 366 of file template.php.
template::helpStyle | ( | ) |
Returns ' style='cursor:help;'' if the client supports CSS styles Use for -links to help texts
Definition at line 376 of file template.php.
template::getHeader | ( | $ | table, | |
$ | row, | |||
$ | path, | |||
$ | noViewPageIcon = 0 , |
|||
$ | tWrap = array('','') | |||
) |
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.
string | Table name | |
array | Record row | |
string | Alt text | |
boolean | Set $noViewPageIcon true if you don't want a magnifier-icon for viewing the page in the frontend | |
array | $tWrap is an array with indexes 0 and 1 each representing HTML-tags (start/end) which will wrap the title |
Definition at line 393 of file template.php.
References t3lib_div::fixed_lgd_cs(), t3lib_iconWorks::getIconImage(), and viewPageIcon().
template::getFileheader | ( | $ | title, | |
$ | path, | |||
$ | iconfile | |||
) |
Like ->getHeader() but for files in the File>* main module/submodules Returns the file-icon with the path of the file set in the alt/title attribute. Shows the file-name after the icon.
string | Title string, expected to be the filepath | |
string | Alt text | |
string | The icon file (relative to TYPO3 dir) |
Definition at line 419 of file template.php.
References t3lib_div::fixed_lgd_cs(), and t3lib_div::split_fileref().
template::makeShortcutIcon | ( | $ | gvList, | |
$ | setList, | |||
$ | modName, | |||
$ | motherModName = "" | |||
) |
Returns a linked shortcut-icon which will call the shortcut frame and set a shortcut there back to the calling page/module
string | Is the list of GET variables to store (if any) | |
string | Is the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules | |
string | Module name string | |
string | Is 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.php and wizard_rte.php scripts where those scripts are really running as a part of another module. |
Definition at line 434 of file template.php.
References $backPath, t3lib_div::getIndpEnv(), and makeShortcutUrl().
template::makeShortcutUrl | ( | $ | gvList, | |
$ | setList | |||
) |
MAKE url for storing Internal func
string | Is the list of GET variables to store (if any) | |
string | Is the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules |
Definition at line 467 of file template.php.
References t3lib_div::_GET(), t3lib_div::compileSelectedGetVarsFromArray(), and t3lib_div::implodeArrayForUrl().
Referenced by makeShortcutIcon().
template::formWidth | ( | $ | size = 48 , |
|
$ | textarea = 0 , |
|||
$ | 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.
integer | A relative number which multiplied with approx. 10 will lead to the width in pixels | |
boolean | A flag you can set for textareas - DEPRECATED, use ->formWidthText() for textareas!!! | |
string | A string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled) |
Definition at line 488 of file template.php.
Referenced by formWidthText().
template::formWidthText | ( | $ | size = 48 , |
|
$ | styleOverride = '' , |
|||
$ | wrap = '' | |||
) |
This function is dedicated to textareas, which has the wrapping on/off option to observe. EXAMPLE: <textarea rows="10" wrap="off" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48,"","off").'> or <textarea rows="10" wrap="virtual" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48,"","virtual").'>
integer | A relative number which multiplied with approx. 10 will lead to the width in pixels | |
string | A string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled) | |
string | Pass on the wrap-attribute value you use in your <textarea>! This will be used to make sure that some browsers will detect wrapping alright. |
Definition at line 513 of file template.php.
References formWidth().
template::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)
string | URL to "this location" / current script |
Definition at line 530 of file template.php.
References t3lib_div::_GP(), and t3lib_div::linkThisScript().
template::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
integer | UNIX timestamp, seconds since 1970 | |
integer | How much data to show: $type = 1: hhmm, $type = 10: ddmmmyy |
Definition at line 554 of file template.php.
template::parseTime | ( | ) |
Returns script parsetime IF ->parseTimeFlag is set and user is "admin" Automatically outputted in page end
Definition at line 571 of file template.php.
References t3lib_div::getIndpEnv().
Referenced by endPage().
template::startPage | ( | $ | title | ) |
Returns page start This includes the proper header with charset, title, meta tag and beginning body-tag.
string | HTML Page title for the header |
Definition at line 604 of file template.php.
References docBodyTagBegin(), generator(), header(), initCharset(), and section().
template::endPage | ( | ) |
Returns page end; This includes finishing form, div, body and html tags.
Definition at line 686 of file template.php.
References t3lib_div::devLog(), endPageJS(), t3lib_BEfunc::getSetUpdateSignal(), parseTime(), section(), and sectionEnd().
template::header | ( | $ | text | ) |
Returns the header-bar in the top of most backend modules Closes section if open.
string | The text string for the header |
Definition at line 720 of file template.php.
References sectionEnd().
Referenced by sectionHeader(), and startPage().
template::section | ( | $ | label, | |
$ | text, | |||
$ | nostrtoupper = FALSE , |
|||
$ | sH = FALSE , |
|||
$ | type = 0 , |
|||
$ | allowHTMLinHeader = FALSE | |||
) |
Begins an output section and sets header and content
string | The header | |
string | The HTML-content | |
boolean | A flag that will prevent the header from being converted to uppercase | |
boolean | Defines the type of header (if set, "<h3>" rather than the default "h4") | |
integer | The number of an icon to show with the header (see the icon-function). -1,1,2,3 | |
boolean | If set, HTML tags are allowed in $label (otherwise this value is by default htmlspecialchars()'ed) |
Definition at line 741 of file template.php.
References icons(), sectionBegin(), and sectionHeader().
Referenced by endPage(), sectionBegin(), sectionEnd(), and startPage().
template::divider | ( | $ | dist | ) |
Inserts a divider image Ends a section (if open) before inserting the image
integer | The margin-top/-bottom of the ruler. |
Definition at line 765 of file template.php.
References sectionEnd().
template::spacer | ( | $ | dist | ) |
Returns a blank
integer | Padding-top for the div-section (should be margin-top but konqueror (3.1) doesn't like it :-( |
Definition at line 781 of file template.php.
template::sectionHeader | ( | $ | label, | |
$ | sH = FALSE , |
|||
$ | addAttrib = '' | |||
) |
Make a section header. Begins a section if not already open.
string | The label between the<h3> or<h4> tags. (Allows HTML) | |
boolean | If set,is used, otherwise<h4> string Additional attributes to h-tag, eg. ' class=""' string HTML content |
Definition at line 800 of file template.php.
References header(), and sectionBegin().
Referenced by section().
template::sectionBegin | ( | ) |
Begins an output section. Returns the
Definition at line 817 of file template.php.
References section().
Referenced by section(), and sectionHeader().
template::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.
Definition at line 838 of file template.php.
References section().
template::middle | ( | ) |
Originally it printed a kind of divider. Deprecated. Just remove function calls to it or call the divider() function instead.
Definition at line 858 of file template.php.
template::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)
Definition at line 867 of file template.php.
Referenced by endPage().
template::docBodyTagBegin | ( | ) |
Creates the bodyTag. You can add to the bodyTag by $this->bodyTagAdditions
Definition at line 884 of file template.php.
Referenced by startPage().
template::docStyle | ( | ) |
Outputting document style
Definition at line 894 of file template.php.
template::insertStylesAndJS | ( | $ | content | ) |
Insert post rendering document style into already rendered content This is needed for extobjbase
string | style-content to insert. |
Definition at line 936 of file template.php.
template::initCharset | ( | ) |
Initialize the charset. Sets the internal $this->charset variable to the charset defined in $GLOBALS["LANG"] (or the default as set in this class) Returns the meta-tag for the document header
Definition at line 956 of file template.php.
Referenced by startPage().
template::generator | ( | ) |
Returns generator meta tag
Definition at line 968 of file template.php.
Referenced by startPage().
template::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)
integer | See description | |
string | Value for style attribute |
Definition at line 1001 of file template.php.
Referenced by section().
template::t3Button | ( | $ | onClick, | |
$ | label | |||
) |
Returns an <input> button with the $onClick action and $label
string | The value of the onclick attribute of the input tag (submit type) | |
string | The label for the button (which will be htmlspecialchar'ed) |
Definition at line 1030 of file template.php.
template::dfw | ( | $ | string | ) |
dimmed-fontwrap. Returns the string wrapped in a -tag defining the color to be gray/dimmed
string Input string
Definition at line 1041 of file template.php.
template::rfw | ( | $ | string | ) |
red-fontwrap. Returns the string wrapped in a -tag defining the color to be red
string Input string
Definition at line 1051 of file template.php.
template::wrapInCData | ( | $ | string | ) |
Returns string wrapped in CDATA "tags" for XML / XHTML (wrap content of <script> and <style> sections in those!)
string | Input string |
Definition at line 1061 of file template.php.
template::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.
string | Input string | |
boolean | Wrap script element in linebreaks? Default is TRUE. |
Definition at line 1078 of file template.php.
template::table | ( | $ | arr, | |
$ | layout = '' | |||
) |
Returns a table based on the input $arr
array | Multidim array with first levels = rows, second levels = cells | |
array | If set, then this provides an alternative layout array instead of $this->tableLayout |
Definition at line 1117 of file template.php.
template::menuTable | ( | $ | arr1, | |
$ | arr2 = array() , |
|||
$ | arr3 = array() | |||
) |
Constructs a table with content from the $arr1, $arr2 and $arr3. Used in eg. ext/belog/mod/index.php - refer to that for examples
array | Menu elements on first level | |
array | Secondary items | |
array | Third-level items |
Definition at line 1159 of file template.php.
template::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
string | Content cell content (left) | |
string | Menu cell content (right) |
Definition at line 1192 of file template.php.
template::clearCacheMenu | ( | $ | id, | |
$ | addSaveOptions = 0 | |||
) |
Creates a selector box with clear-cache items. Rather specialized functions - at least don't use it with $addSaveOptions unless you know what you do...
integer | The page uid of the "current page" - the one that will be cleared as "clear cache for this page". | |
boolean | If $addSaveOptions is set, then also the array of save-options for TCE_FORMS will appear. |
Definition at line 1210 of file template.php.
References t3lib_div::getIndpEnv().
template::getContextMenuCode | ( | ) |
Returns an array with parts (JavaScript, init-functions,
Definition at line 1246 of file template.php.
References t3lib_ajax::getJScode().
template::getDragDropCode | ( | $ | table | ) |
Returns an array with parts (JavaScript, init-functions,
string | indicator of which table the drag and drop function should work on (pages or folders) |
Definition at line 1471 of file template.php.
template::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
mixed | $id is 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 | $elementName it the form elements name, probably something like "SET[...]" | |
string | $currentValue is the value to be selected currently. | |
array | $menuItems is an array with the menu items for the selector box | |
string | $script is the script to send the &id to, if empty it's automatically found | |
string | $addParams is additional parameters to pass to the script. |
Definition at line 1576 of file template.php.
References t3lib_div::deHSCentities(), and t3lib_div::implodeArrayForUrl().
template::getTabMenuRaw | ( | $ | menuItems | ) |
Creates the HTML content for the tab menu
array | Menu items for tabs |
Definition at line 1606 of file template.php.
template::getDynTabMenu | ( | $ | menuItems, | |
$ | identString, | |||
$ | toggle = 0 , |
|||
$ | foldout = FALSE , |
|||
$ | newRowCharLimit = 50 , |
|||
$ | noWrap = 1 , |
|||
$ | fullWidth = FALSE , |
|||
$ | defaultTabIndex = 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!
array | Numeric 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 | Identification string. This should be unique for every instance of a dynamic menu! | |
integer | If "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. | |
boolean | If 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. | |
integer | Character limit for a new row. | |
boolean | If set, tab table cells are not allowed to wrap their content | |
boolean | If set, the tabs will span the full width of their position | |
integer | Default 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. |
Definition at line 1675 of file template.php.
template::getDynTabMenuId | ( | $ | identString | ) |
Creates the id for dynTabMenus.
string | $identString: Identification string. This should be unique for every instance of a dynamic menu! |
Definition at line 1801 of file template.php.
template::getDynTabMenuJScode | ( | ) |
Returns dynamic tab menu header JS code.
Definition at line 1811 of file template.php.
template::getVersionSelector | ( | $ | id, | |
$ | noAction = FALSE | |||
) |
Creates the version selector for the page id inputted. Requires the core version management extension, "version" to be loaded.
integer | Page id to create selector for. | |
boolean | If set, there will be no button for swapping page. |
Definition at line 1902 of file template.php.
References t3lib_BEfunc::countVersionsOfRecordsOnPage(), t3lib_BEfunc::getRecord(), t3lib_BEfunc::getWorkspaceVersionOfRecord(), t3lib_extMgm::isLoaded(), t3lib_BEfunc::isPidInVersionizedBranch(), t3lib_div::linkThisScript(), and t3lib_BEfunc::selectVersionsOfRecord().
template::$tableLayout |
Initial value:
Array ( 'defRow' => Array ( 'defCol' => Array('<td valign="top">','</td>') ) )
Definition at line 1101 of file template.php.