Öffentliche Methoden | |
| 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) | |
| loadJavascriptLib ($lib) | |
| 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, $dividers2tabs=2) | |
| getDynTabMenuId ($identString) | |
| getDynTabMenuJScode () | |
| getVersionSelector ($id, $noAction=FALSE) | |
| getHtmlTemplate ($filename) | |
| setModuleTemplate ($filename) | |
| moduleBody ($pageRecord=array(), $buttons=array(), $markerArray=array(), $subpartArray=array()) | |
Öffentliche Attribute | |
| $divClass = 'typo3-bigDoc' | |
| $backPath = '' | |
| $form = '' | |
| $JScodeLibArray = array() | |
| $JScode = '' | |
| $JScodeArray = array() | |
| $postCode = '' | |
| $docType = '' | |
| $moduleTemplate = '' | |
| $scriptID = '' | |
| $bodyTagId = '' | |
| $bodyTagAdditions = '' | |
| $inDocStyles = '' | |
| $inDocStylesArray = array() | |
| $form_rowsToStylewidth = 9.58 | |
| $form_largeComp = 1.33 | |
| $endJS = 1 | |
| $additionalHeaderData = array() | |
| $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 | |
| $tableLayout | |
| $table_TR = '<tr>' | |
| $table_TABLE = '<table border="0" cellspacing="0" cellpadding="0" id="typo3-tmpltable">' | |
Geschützte Methoden | |
| getDocHeaderButtons ($buttons) | |
| getPagePath ($pageRecord) | |
| getPageInfo ($pageRecord) | |
Extension class for "template" - used for backend pages which are wide. Typically modules taking up all the space in the "content" frame of the backend The class were more significant in the past than today.
| template::clearCacheMenu | ( | $ | id, | |
| $ | addSaveOptions = 0 | |||
| ) | [inherited] |
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. |
| template::dfw | ( | $ | string | ) | [inherited] |
dimmed-fontwrap. Returns the string wrapped in a -tag defining the color to be gray/dimmed
| string | Input string |
| template::divider | ( | $ | dist | ) | [inherited] |
Inserts a divider image Ends a section (if open) before inserting the image
| integer | The margin-top/-bottom of the ruler. |
| template::docBodyTagBegin | ( | ) | [inherited] |
Creates the bodyTag. You can add to the bodyTag by $this->bodyTagAdditions
| template::docStyle | ( | ) | [inherited] |
Outputting document style
| template::endPage | ( | ) | [inherited] |
Returns page end; This includes finishing form, div, body and html tags.
| template::endPageJS | ( | ) | [inherited] |
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)
| template::formatTime | ( | $ | tstamp, | |
| $ | type | |||
| ) | [inherited] |
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 |
| template::formWidth | ( | $ | size = 48, |
|
| $ | textarea = 0, |
|||
| $ | styleOverride = '' | |||
| ) | [inherited] |
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) |
| template::formWidthText | ( | $ | size = 48, |
|
| $ | styleOverride = '', |
|||
| $ | wrap = '' | |||
| ) | [inherited] |
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. |
| template::funcMenu | ( | $ | content, | |
| $ | menu | |||
| ) | [inherited] |
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) |
| template::generator | ( | ) | [inherited] |
Returns generator meta tag
| template::getContextMenuCode | ( | ) | [inherited] |
Includes the necessary Javascript function for the clickmenu (context sensitive menus) in the document
| template::getDocHeaderButtons | ( | $ | buttons | ) | [protected, inherited] |
Fill the button lists with the defined HTML
| array | HTML for all buttons |
| template::getDragDropCode | ( | $ | table | ) | [inherited] |
Includes the necessary javascript file (tree.js) for use on pages which have the drag and drop functionality (usually pages and folder display trees)
| string | indicator of which table the drag and drop function should work on (pages or folders) |
| template::getDynTabMenu | ( | $ | menuItems, | |
| $ | identString, | |||
| $ | toggle = 0, |
|||
| $ | foldout = FALSE, |
|||
| $ | newRowCharLimit = 50, |
|||
| $ | noWrap = 1, |
|||
| $ | fullWidth = FALSE, |
|||
| $ | defaultTabIndex = 1, |
|||
| $ | dividers2tabs = 2 | |||
| ) | [inherited] |
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. | |
| integer | If set to '1' empty tabs will be remove, If set to '2' empty tabs will be disabled |
| template::getDynTabMenuId | ( | $ | identString | ) | [inherited] |
Creates the id for dynTabMenus.
| string | $identString: Identification string. This should be unique for every instance of a dynamic menu! |
| template::getDynTabMenuJScode | ( | ) | [inherited] |
Returns dynamic tab menu header JS code.
| template::getFileheader | ( | $ | title, | |
| $ | path, | |||
| $ | iconfile | |||
| ) | [inherited] |
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) |
| template::getHeader | ( | $ | table, | |
| $ | row, | |||
| $ | path, | |||
| $ | noViewPageIcon = 0, |
|||
| $ | tWrap = array('','') | |||
| ) | [inherited] |
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 |
| template::getHtmlTemplate | ( | $ | filename | ) | [inherited] |
| template::getPageInfo | ( | $ | pageRecord | ) | [protected, inherited] |
Setting page icon with clickmenu + uid for docheader
| array | Current page |
| template::getPagePath | ( | $ | pageRecord | ) | [protected, inherited] |
Generate the page path for docheader
| array | Current page |
| template::getTabMenu | ( | $ | mainParams, | |
| $ | elementName, | |||
| $ | currentValue, | |||
| $ | menuItems, | |||
| $ | script = '', |
|||
| $ | addparams = '' | |||
| ) | [inherited] |
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. |
| template::getTabMenuRaw | ( | $ | menuItems | ) | [inherited] |
Creates the HTML content for the tab menu
| array | Menu items for tabs |
| template::getVersionSelector | ( | $ | id, | |
| $ | noAction = FALSE | |||
| ) | [inherited] |
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. |
| template::header | ( | $ | text | ) | [inherited] |
Returns the header-bar in the top of most backend modules Closes section if open.
| string | The text string for the header |
| template::helpStyle | ( | ) | [inherited] |
Returns ' style='cursor:help;'' if the client supports CSS styles Use for -links to help texts
| template::icons | ( | $ | type, | |
| $ | styleAttribValue = '' | |||
| ) | [inherited] |
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 |
| template::initCharset | ( | ) | [inherited] |
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
| template::insertStylesAndJS | ( | $ | content | ) | [inherited] |
Insert post rendering document style into already rendered content This is needed for extobjbase
| string | style-content to insert. |
| template::isCMlayers | ( | ) | [inherited] |
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.
| template::issueCommand | ( | $ | params, | |
| $ | rUrl = '' | |||
| ) | [inherited] |
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 |
| template::loadJavascriptLib | ( | $ | lib | ) | [inherited] |
Includes a javascript library that exists in the core /typo3/ directory. The backpath is automatically applied
| string | $lib: Library name. Call it with the full path like "contrib/prototype/prototype.js" to load it |
| template::makeShortcutIcon | ( | $ | gvList, | |
| $ | setList, | |||
| $ | modName, | |||
| $ | motherModName = "" | |||
| ) | [inherited] |
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. |
| template::makeShortcutUrl | ( | $ | gvList, | |
| $ | setList | |||
| ) | [inherited] |
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 |
| template::menuTable | ( | $ | arr1, | |
| $ | arr2 = array(), |
|||
| $ | arr3 = array() | |||
| ) | [inherited] |
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 |
| template::middle | ( | ) | [inherited] |
Originally it printed a kind of divider. Deprecated. Just remove function calls to it or call the divider() function instead.
| template::moduleBody | ( | $ | pageRecord = array(), |
|
| $ | buttons = array(), |
|||
| $ | markerArray = array(), |
|||
| $ | subpartArray = array() | |||
| ) | [inherited] |
Put together the various elements for the module <body> using a static HTML template
| array | Record of the current page, used for page path and info | |
| array | HTML for all buttons | |
| array | HTML for all other markers |
| template::parseTime | ( | ) | [inherited] |
Returns script parsetime IF ->parseTimeFlag is set and user is "admin" Automatically outputted in page end
| template::redirectUrls | ( | $ | thisLocation = '' |
) | [inherited] |
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 |
| template::rfw | ( | $ | string | ) | [inherited] |
red-fontwrap. Returns the string wrapped in a -tag defining the color to be red
| string | Input string |
| template::section | ( | $ | label, | |
| $ | text, | |||
| $ | nostrtoupper = FALSE, |
|||
| $ | sH = FALSE, |
|||
| $ | type = 0, |
|||
| $ | allowHTMLinHeader = FALSE | |||
| ) | [inherited] |
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) |
| template::sectionBegin | ( | ) | [inherited] |
Begins an output section. Returns the
| template::sectionEnd | ( | ) | [inherited] |
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.
| template::sectionHeader | ( | $ | label, | |
| $ | sH = FALSE, |
|||
| $ | addAttrib = '' | |||
| ) | [inherited] |
Make a section header. Begins a section if not already open.
| string | The label between the
or tags. (Allows HTML) boolean If set, is used, otherwise string Additional attributes to h-tag, eg. ' class=""' string HTML content |
| template::setModuleTemplate | ( | $ | filename | ) | [inherited] |
Define the template for the module
| string | filename |
| template::spacer | ( | $ | dist | ) | [inherited] |
Returns a blank
| integer | Padding-top for the div-section (should be margin-top but konqueror (3.1) doesn't like it :-( |
| template::startPage | ( | $ | title | ) | [inherited] |
Returns page start This includes the proper header with charset, title, meta tag and beginning body-tag.
| string | HTML Page title for the header |
| template::t3Button | ( | $ | onClick, | |
| $ | label | |||
| ) | [inherited] |
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) |
| template::table | ( | $ | arr, | |
| $ | layout = '' | |||
| ) | [inherited] |
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 |
| template::template | ( | ) | [inherited] |
Constructor Imports relevant parts from global $TBE_STYLES (colorscheme)
| template::thisBlur | ( | ) | [inherited] |
Returns 'this.blur();' if the client supports CSS styles Use this in links to remove the underlining after being clicked
| template::viewPageIcon | ( | $ | id, | |
| $ | backPath, | |||
| $ | addParams = 'hspace="3"' | |||
| ) | [inherited] |
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) |
| template::wrapClickMenuOnIcon | ( | $ | str, | |
| $ | table, | |||
| $ | uid = '', |
|||
| $ | listFr = 1, |
|||
| $ | addParams = '', |
|||
| $ | enDisItems = '', |
|||
| $ | returnOnClick = FALSE | |||
| ) | [inherited] |
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. |
| template::wrapInCData | ( | $ | string | ) | [inherited] |
Returns string wrapped in CDATA "tags" for XML / XHTML (wrap content of <script> and <style> sections in those!)
| string | Input string |
| template::wrapScriptTags | ( | $ | string, | |
| $ | linebreak = TRUE | |||
| ) | [inherited] |
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. |
template::$tableLayout [inherited] |
Array (
'defRow' => Array (
'defCol' => Array('<td valign="top">','</td>')
)
)
1.6.1