bigDoc Klassenreferenz

Klassendiagramm für bigDoc:
template

Aufstellung aller Elemente

Ö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)

Ausführliche Beschreibung

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.


Dokumentation der Elementfunktionen

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

Parameter:
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.
Rückgabe:
string <select> tag with content - a selector box for clearing the cache
template::dfw ( string  )  [inherited]

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

Parameter:
string Input string
Rückgabe:
string Output string

template::divider ( dist  )  [inherited]

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

Parameter:
integer The margin-top/-bottom of the
ruler.
Rückgabe:
string HTML content
template::docBodyTagBegin (  )  [inherited]

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

Rückgabe:
string HTML body tag
template::docStyle (  )  [inherited]

Outputting document style

Rückgabe:
string HTML style section/link tags
template::endPage (  )  [inherited]

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

Rückgabe:
string The HTML end of a page
Siehe auch:
startPage()
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)

Rückgabe:
string HTML content (<script> tag section)
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

Parameter:
integer UNIX timestamp, seconds since 1970
integer How much data to show: $type = 1: hhmm, $type = 10: ddmmmyy
Rückgabe:
string Formatted timestamp
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.

Parameter:
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)
Rückgabe:
string Tag attributes for an <input> tag (regarding width)
Siehe auch:
formWidthText()
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").'>

Parameter:
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.
Rückgabe:
string Tag attributes for an <input> tag (regarding width)
Siehe auch:
formWidth()
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

Parameter:
string Content cell content (left)
string Menu cell content (right)
Rückgabe:
string HTML output
template::generator (  )  [inherited]

Returns generator meta tag

Rückgabe:
string <meta> tag with name "generator"
template::getContextMenuCode (  )  [inherited]

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

Rückgabe:
array Deprecated: Includes the code already in the doc, so the return array is always empty. Please just call this function without expecting a return value for future calls
template::getDocHeaderButtons ( buttons  )  [protected, inherited]

Fill the button lists with the defined HTML

Parameter:
array HTML for all buttons
Rückgabe:
array Containing HTML for both buttonlists
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)

Parameter:
string indicator of which table the drag and drop function should work on (pages or folders)
Rückgabe:
array If values are present: [0] = A <script> section for the HTML page header, [1] = onmousemove/onload handler for HTML tag or alike, [2] = One empty
layer for the follow-mouse drag element
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!

Parameter:
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
Rückgabe:
string JavaScript section for the HTML header.
template::getDynTabMenuId ( identString  )  [inherited]

Creates the id for dynTabMenus.

Parameter:
string $identString: Identification string. This should be unique for every instance of a dynamic menu!
Rückgabe:
string The id with a short MD5 of $identString and prefixed "DTM-", like "DTM-2e8791854a"
template::getDynTabMenuJScode (  )  [inherited]

Returns dynamic tab menu header JS code.

Rückgabe:
string JavaScript section for the HTML header.
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.

Parameter:
string Title string, expected to be the filepath
string Alt text
string The icon file (relative to TYPO3 dir)
Rückgabe:
string HTML content
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.

Parameter:
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
Rückgabe:
string HTML content
template::getHtmlTemplate ( filename  )  [inherited]

Function to load a HTML template file with markers.

Parameter:
string tmpl name, usually in the typo3/template/ directory
Rückgabe:
string HTML of template
template::getPageInfo ( pageRecord  )  [protected, inherited]

Setting page icon with clickmenu + uid for docheader

Parameter:
array Current page
Rückgabe:
string Page info
template::getPagePath ( pageRecord  )  [protected, inherited]

Generate the page path for docheader

Parameter:
array Current page
Rückgabe:
string Page path
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

Parameter:
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.
Rückgabe:
string HTML code for tab menu
Autor:
Rene Fritz <r.fritz@colorcube.de>
template::getTabMenuRaw ( menuItems  )  [inherited]

Creates the HTML content for the tab menu

Parameter:
array Menu items for tabs
Rückgabe:
string Table HTML private
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.

Parameter:
integer Page id to create selector for.
boolean If set, there will be no button for swapping page.
Rückgabe:
void
template::header ( text  )  [inherited]

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

Parameter:
string The text string for the header
Rückgabe:
string HTML content
template::helpStyle (  )  [inherited]

Returns ' style='cursor:help;'' if the client supports CSS styles Use for -links to help texts

Rückgabe:
string
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)

Parameter:
integer See description
string Value for style attribute
Rückgabe:
string HTML image tag (if applicable)
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

Rückgabe:
string <meta> tag with charset from $this->charset or $GLOBALS['LANG']->charSet
template::insertStylesAndJS ( content  )  [inherited]

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

Parameter:
string style-content to insert.
Rückgabe:
string content with inserted styles
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.

Rückgabe:
boolean
template::issueCommand ( params,
rUrl = '' 
) [inherited]

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

Parameter:
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
Rückgabe:
string URL to tce_db.php + parameters (backpath is taken from $this->backPath)
Siehe auch:
t3lib_BEfunc::editOnClick()
template::loadJavascriptLib ( lib  )  [inherited]

Includes a javascript library that exists in the core /typo3/ directory. The backpath is automatically applied

Parameter:
string $lib: Library name. Call it with the full path like "contrib/prototype/prototype.js" to load it
Rückgabe:
void
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

Parameter:
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.
Rückgabe:
string HTML content
template::makeShortcutUrl ( gvList,
setList 
) [inherited]

MAKE url for storing Internal func

Parameter:
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
Rückgabe:
string private
Siehe auch:
makeShortcutIcon()
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

Parameter:
array Menu elements on first level
array Secondary items
array Third-level items
Rückgabe:
string HTML content,
..
template::middle (  )  [inherited]

Originally it printed a kind of divider. Deprecated. Just remove function calls to it or call the divider() function instead.

Rückgabe:
void
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

Parameter:
array Record of the current page, used for page path and info
array HTML for all buttons
array HTML for all other markers
Rückgabe:
string Composite HTML
template::parseTime (  )  [inherited]

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

Rückgabe:
string
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)

Parameter:
string URL to "this location" / current script
Rückgabe:
string
Siehe auch:
typo3/db_list.php
template::rfw ( string  )  [inherited]

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

Parameter:
string Input string
Rückgabe:
string Output string

template::section ( label,
text,
nostrtoupper = FALSE,
sH = FALSE,
type = 0,
allowHTMLinHeader = FALSE 
) [inherited]

Begins an output section and sets header and content

Parameter:
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)
Rückgabe:
string HTML content
Siehe auch:
icons(), sectionHeader()
template::sectionBegin (  )  [inherited]

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!
Rückgabe:
string HTML content
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.

Rückgabe:
string HTML content
template::sectionHeader ( label,
sH = FALSE,
addAttrib = '' 
) [inherited]

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

Parameter:
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

Parameter:
string filename
template::spacer ( dist  )  [inherited]

Returns a blank

-section with a height
Parameter:
integer Padding-top for the div-section (should be margin-top but konqueror (3.1) doesn't like it :-(
Rückgabe:
string HTML content
template::startPage ( title  )  [inherited]

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

Parameter:
string HTML Page title for the header
Rückgabe:
string Returns the whole header section of a HTML-document based on settings in internal variables (like styles, javascript code, charset, generator and docType)
Siehe auch:
endPage()
template::t3Button ( onClick,
label 
) [inherited]

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

Parameter:
string The value of the onclick attribute of the input tag (submit type)
string The label for the button (which will be htmlspecialchar'ed)
Rückgabe:
string A <input> tag of the type "submit"
template::table ( arr,
layout = '' 
) [inherited]

Returns a table based on the input $arr

Parameter:
array Multidim array with first levels = rows, second levels = cells
array If set, then this provides an alternative layout array instead of $this->tableLayout
Rückgabe:
string The HTML table.
template::template (  )  [inherited]

Constructor Imports relevant parts from global $TBE_STYLES (colorscheme)

Rückgabe:
void
template::thisBlur (  )  [inherited]

Returns 'this.blur();' if the client supports CSS styles Use this in links to remove the underlining after being clicked

Rückgabe:
string
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)

Parameter:
integer The page id
string The current "BACK_PATH" (the back relative to the typo3/ directory)
string Additional parameters for the image tag(s)
Rückgabe:
string HTML string with linked icon(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)

Parameter:
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.
Rückgabe:
string The link-wrapped input string.
template::wrapInCData ( string  )  [inherited]

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

Parameter:
string Input string
Rückgabe:
string Output 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.

Parameter:
string Input string
boolean Wrap script element in linebreaks? Default is TRUE.
Rückgabe:
string Output string

Dokumentation der Datenelemente

template::$tableLayout [inherited]
Initialisierung:
 Array (
                'defRow' => Array (
                        'defCol' => Array('<td valign="top">','</td>')
                )
        )

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
 Alle Klassen Namensbereiche Funktionen Variablen

Erzeugt am Wed Oct 28 16:40:21 2009 für Typo3 von  doxygen 1.6.1