Documentation TYPO3 par Ameos

t3lib_TCEforms Class Reference

Inheritance diagram for t3lib_TCEforms:
[legend]
List of all members.

Public Member Functions

 t3lib_TCEforms ()
 initDefaultBEmode ()
 getSoloField ($table, $row, $theFieldToReturn)
 getMainFields ($table, $row, $depth=0)
 getListedFields ($table, $row, $list)
 getPaletteFields ($table, $row, $palette, $header='', $itemList='', $collapsedHeader='')
 getSingleField ($table, $field, $row, $altName='', $palette=0, $extra='', $pal=0)
 getSingleField_SW ($table, $field, $row, &$PA)
 getSingleField_typeInput ($table, $field, $row, &$PA)
 getSingleField_typeText ($table, $field, $row, &$PA)
 getSingleField_typeCheck ($table, $field, $row, &$PA)
 getSingleField_typeRadio ($table, $field, $row, &$PA)
 getSingleField_typeSelect ($table, $field, $row, &$PA)
 getSingleField_typeSelect_single ($table, $field, $row, &$PA, $config, $selItems, $nMV_label)
 getSingleField_typeSelect_checkbox ($table, $field, $row, &$PA, $config, $selItems, $nMV_label)
 getSingleField_typeSelect_singlebox ($table, $field, $row, &$PA, $config, $selItems, $nMV_label)
 getSingleField_typeSelect_multiple ($table, $field, $row, &$PA, $config, $selItems, $nMV_label)
 getSingleField_typeGroup ($table, $field, $row, &$PA)
 getSingleField_typeNone ($table, $field, $row, &$PA)
 getSingleField_typeNone_render ($config, $itemValue)
 getSingleField_typeFlex ($table, $field, $row, &$PA)
 getSingleField_typeFlex_langMenu ($languages, $elName, $selectedLanguage, $multi=1)
 getSingleField_typeFlex_sheetMenu ($sArr, $elName, $sheetKey)
 getSingleField_typeFlex_draw ($dataStruct, $editData, $cmdData, $table, $field, $row, &$PA, $formPrefix='', $level=0, $tRows=array())
 getSingleField_typeUnknown ($table, $field, $row, &$PA)
 getSingleField_typeUser ($table, $field, $row, &$PA)
 formatValue ($config, $itemValue)
 getRTypeNum ($table, $row)
 rearrange ($fields)
 getExcludeElements ($table, $row, $typeNum)
 getFieldsToAdd ($table, $row, $typeNum)
 mergeFieldsWithAddedFields ($fields, $fieldsToAdd)
 setTSconfig ($table, $row, $field='')
 overrideFieldConf ($fieldConfig, $TSconfig)
 getSpecConfForField ($table, $row, $field)
 getSpecConfFromString ($extraString, $defaultExtras)
 registerDefaultLanguageData ($table, $rec)
 getLanguageOverlayRawValue ($table, $row, $field, $fieldConf)
 renderDefaultLanguageContent ($table, $field, $row, $item)
 renderDefaultLanguageDiff ($table, $field, $row, $item)
 dbFileIcons ($fName, $mode, $allowed, $itemArray, $selector='', $params=array(), $onFocus='', $table='', $field='', $uid='')
 getClipboardElements ($allowed, $mode)
 getClickMenu ($str, $table, $uid='')
 renderWizards ($itemKinds, $wizConf, $table, $row, $field, &$PA, $itemName, $specConf, $RTE=0)
 getIcon ($icon)
 optionTagStyle ($iconString)
 extractValuesOnlyFromValueLabelList ($itemFormElValue)
 wrapOpenPalette ($header, $table, $row, $palette, $retFunc=0)
 checkBoxParams ($itemName, $thisValue, $c, $iCount, $addFunc='')
 elName ($itemName)
 noTitle ($str, $wrapParts=array())
 blur ()
 thisReturnUrl ()
 getSingleHiddenField ($table, $field, $row)
 formWidth ($size=48, $textarea=0)
 formWidthText ($size=48, $wrap='')
 formElStyle ($type)
 formElClass ($type)
 formElStyleClassValue ($type, $class=FALSE)
 insertDefStyle ($type)
 getDynTabMenu ($parts, $idString)
 initItemArray ($fieldValue)
 addItems ($items, $iArray)
 procItems ($items, $iArray, $config, $table, $row, $field)
 addSelectOptionsToItemArray ($items, $fieldValue, $TSconfig, $field)
 addSelectOptionsToItemArray_makeModuleData ($value)
 foreignTable ($items, $fieldValue, $TSconfig, $field, $pFFlag=0)
 setNewBEDesign ()
 intoTemplate ($inArr, $altTemplate='')
 addUserTemplateMarkers ($marker, $table, $field, $row, &$PA)
 wrapLabels ($str)
 wrapTotal ($c, $rec, $table)
 replaceTableWrap ($arr, $rec, $table)
 wrapBorder (&$out_array, &$out_pointer)
 rplColorScheme ($inTemplate)
 getDivider ()
 printPalette ($palArr)
 helpTextIcon ($table, $field, $force=0)
 helpText ($table, $field)
 setColorScheme ($scheme)
 resetSchemes ()
 storeSchemes ()
 restoreSchemes ()
 JStop ()
 JSbottom ($formname='forms[0]', $update=false)
 dbFileCon ($formObj='document.forms[0]')
 printNeededJSFunctions ()
 printNeededJSFunctions_top ()
 getDefaultRecord ($table, $pid=0)
 getRecordPath ($table, $rec)
 readPerms ()
 sL ($str)
 getLL ($str)
 isPalettesCollapsed ($table, $palette)
 isDisplayCondition ($displayCond, $row, $ffValueKey='')
 getTSCpid ($table, $uid, $pid)
 doLoadTableDescr ($table)
 getAvailableLanguages ($onlyIsoCoded=1, $setDefault=1)
 getLanguageIcon ($table, $row, $sys_language_uid)
 previewFieldValue ($value, $config)
 getAdditionalPreviewLanguages ()
 getDynTabLevelState ($appendString= '')

Public Attributes

 $palFieldArr = array()
 $disableWizards = 0
 $isPalettedoc = 0
 $paletteMargin = 1
 $defStyle = ''
 $cachedTSconfig = array()
 $cachedTSconfig_fieldLevel = array()
 $cachedLanguageFlag = array()
 $cachedAdditionalPreviewLanguages = NULL
 $transformedRow = array()
 $extJSCODE = ''
 $printNeededJS = array()
 $hiddenFieldAccum = array()
 $TBE_EDITOR_fieldChanged_func = ''
 $loadMD5_JS = 1
 $prevBorderStyle = '[nothing here...]'
 $allowUpload = 0
 $titleLen = 15
 $defaultLanguageData = array()
 $defaultLanguageData_diff = array()
 $additionalPreviewLanguageData = array()
 $backPath = ''
 $returnUrl = ''
 $doSaveFieldName = ''
 $palettesCollapsed = 0
 $disableRTE = 0
 $globalShowHelp = 1
 $localizationMode = ''
 $fieldOrder = ''
 $doPrintPalette = 1
 $clipObj = FALSE
 $enableClickMenu = FALSE
 $enableTabMenu = FALSE
 $renderReadonly = FALSE
 $form_rowsToStylewidth = 9.58
 $form_largeComp = 1.33
 $charsPerRow = 40
 $maxTextareaWidth = 48
 $maxInputWidth = 48
 $defaultMultipleSelectorStyle = 'width:250px;'
 $prependFormFieldNames = 'data'
 $prependCmdFieldNames = 'cmd'
 $prependFormFieldNames_file = 'data_files'
 $formName = 'editform'
 $allowOverrideMatrix = array()
 $perms_clause = ''
 $perms_clause_set = 0
 $edit_showFieldHelp = ''
 $docLarge = 0
 $clientInfo = array()
 $RTEenabled = 0
 $RTEenabled_notReasons = ''
 $RTEcounter = 0
 $colorScheme
 $classScheme
 $defColorScheme
 $defClassScheme
 $fieldStyle
 $borderStyle
 $commentMessages = array()
 $totalWrap = '<hr />|<hr />'
 $fieldTemplate = '<b>###FIELD_NAME###</b><br />###FIELD_ITEM###<hr />'
 $sectionWrap = ''
 $palFieldTemplateHeader = ''
 $palFieldTemplate = ''
 $excludeElements = ''
 $palettesRendered = array()
 $hiddenFieldListArr = array()
 $requiredFields = array()
 $requiredElements = array()
 $renderDepth = 0
 $savedSchemes = array()
 $dynTabLevelStack = array()
 $additionalCode_pre = array()
 $additionalJS_pre = array()
 $additionalJS_post = array()
 $additionalJS_submit = array()
 $inline
 $hookObjectsMainFields = array()
 $hookObjectsSingleField = array()
 $extraFormHeaders = array()

Detailed Description

Definition at line 196 of file class.t3lib_tceforms.php.


Member Function Documentation

t3lib_TCEforms::t3lib_TCEforms (  ) 

Constructor function, setting internal variables, loading the styles used.

Returns:
void

Definition at line 310 of file class.t3lib_tceforms.php.

References t3lib_div::clientInfo(), t3lib_div::getUserObj(), t3lib_div::makeInstance(), t3lib_div::modifyHTMLColorAll(), and resetSchemes().

t3lib_TCEforms::initDefaultBEmode (  ) 

Initialize various internal variables.

Returns:
void

Definition at line 371 of file class.t3lib_tceforms.php.

References setNewBEDesign().

t3lib_TCEforms::getSoloField ( table,
row,
theFieldToReturn 
)

Will return the TCEform element for just a single field from a record. The field must be listed in the currently displayed fields (as found in [types][showitem]) for the record. This also means that the $table/$row supplied must be complete so the list of fields to show can be found correctly

Parameters:
string The table name
array The record from the table for which to render a field.
string The field name to return the TCEform element for.
Returns:
string HTML output
See also:
getMainFields()

Definition at line 418 of file class.t3lib_tceforms.php.

References $excludeElements, getExcludeElements(), getRTypeNum(), getSingleField(), t3lib_div::loadTCA(), and t3lib_div::trimExplode().

t3lib_TCEforms::getMainFields ( table,
row,
depth = 0 
)

Based on the $table and $row of content, this displays the complete TCEform for the record. The input-$row is required to be preprocessed if necessary by eg. the t3lib_transferdata class. For instance the RTE content should be transformed through this class first.

Parameters:
string The table name
array The record from the table for which to render a field.
integer Depth level
Returns:
string HTML output
See also:
getSoloField()

Definition at line 457 of file class.t3lib_tceforms.php.

References $excludeElements, doLoadTableDescr(), getDivider(), getExcludeElements(), getFieldsToAdd(), getLL(), getPaletteFields(), getRTypeNum(), getSingleField(), t3lib_div::loadTCA(), mergeFieldsWithAddedFields(), rearrange(), resetSchemes(), setColorScheme(), sL(), t3lib_div::trimExplode(), and wrapBorder().

t3lib_TCEforms::getListedFields ( table,
row,
list 
)

Will return the TCEform elements for a pre-defined list of fields. Notice that this will STILL use the configuration found in the list [types][showitem] for those fields which are found there. So ideally the list of fields given as argument to this function should also be in the current [types][showitem] list of the record. Used for displaying forms for the frontend edit icons for instance.

Parameters:
string The table name
array The record array.
string Commalist of fields from the table. These will be shown in the specified order in a form.
Returns:
string TCEform elements in a string.

Definition at line 654 of file class.t3lib_tceforms.php.

References doLoadTableDescr(), getDivider(), getPaletteFields(), getSingleField(), t3lib_BEfunc::getTCAtypes(), t3lib_div::loadTCA(), and t3lib_div::trimExplode().

t3lib_TCEforms::getPaletteFields ( table,
row,
palette,
header = '',
itemList = '',
collapsedHeader = '' 
)

Creates a palette (collection of secondary options).

Parameters:
string The table name
array The row array
string The palette number/pointer
string Header string for the palette (used when in-form). If not set, no header item is made.
string Optional alternative list of fields for the palette
string Optional Link text for activating a palette (when palettes does not have another form element to belong to).
Returns:
string HTML code.

Definition at line 696 of file class.t3lib_tceforms.php.

References getExcludeElements(), getRTypeNum(), getSingleField(), intoTemplate(), isPalettesCollapsed(), t3lib_div::loadTCA(), printPalette(), t3lib_iconWorks::skinImg(), t3lib_div::trimExplode(), and wrapOpenPalette().

Referenced by getListedFields(), and getMainFields().

t3lib_TCEforms::getSingleField ( table,
field,
row,
altName = '',
palette = 0,
extra = '',
pal = 0 
)

Returns the form HTML code for a database table field.

Parameters:
string The table name
string The field name
array The record to edit from the database table.
string Alternative field name label to show.
boolean Set this if the field is on a palette (in top frame), otherwise not. (if set, field will render as a hidden field).
string The "extra" options from "Part 4" of the field configurations found in the "types" "showitem" list. Typically parsed by $this->getSpecConfFromString() in order to get the options as an associative array.
integer The palette pointer.
Returns:
mixed String (normal) or array (palettes)

Definition at line 773 of file class.t3lib_tceforms.php.

References addUserTemplateMarkers(), t3lib_div::deHSCentities(), getSingleField_SW(), helpText(), helpTextIcon(), t3lib_div::inList(), intoTemplate(), isDisplayCondition(), isPalettesCollapsed(), t3lib_div::loadTCA(), overrideFieldConf(), renderDefaultLanguageContent(), renderDefaultLanguageDiff(), setTSconfig(), t3lib_iconWorks::skinImg(), sL(), t3lib_div::testInt(), thisReturnUrl(), and wrapOpenPalette().

Referenced by getListedFields(), getMainFields(), getPaletteFields(), and getSoloField().

t3lib_TCEforms::getSingleField_SW ( table,
field,
row,
&$  PA 
)

Rendering a single item for the form

Parameters:
string Table name of record
string Fieldname to render
array The record
array parameters array containing a lot of stuff. Value by Reference!
Returns:
string Returns the item as HTML code to insert private
See also:
getSingleField(), getSingleField_typeFlex_draw()

Definition at line 952 of file class.t3lib_tceforms.php.

References getSingleField_typeCheck(), getSingleField_typeFlex(), getSingleField_typeGroup(), getSingleField_typeInput(), getSingleField_typeNone(), getSingleField_typeRadio(), getSingleField_typeSelect(), getSingleField_typeText(), getSingleField_typeUnknown(), and getSingleField_typeUser().

Referenced by getSingleField(), and getSingleField_typeFlex_draw().

t3lib_TCEforms::getSingleField_typeInput ( table,
field,
row,
&$  PA 
)

Generation of TCEform elements of the type "input" This will render a single-line input form field, possibly with various control/validation features

Parameters:
string The table name of the record
string The field name which this element is supposed to edit
array The record data array where the value(s) for the field can be found
array An array with additional configuration options.
Returns:
string The HTML code for the TCEform field

Definition at line 1028 of file class.t3lib_tceforms.php.

References getSingleField_typeNone_render(), getSpecConfFromString(), t3lib_div::getUserObj(), t3lib_div::intInRange(), renderWizards(), and t3lib_div::trimExplode().

Referenced by getSingleField_SW().

t3lib_TCEforms::getSingleField_typeText ( table,
field,
row,
&$  PA 
)

Generation of TCEform elements of the type "text" This will render a <textarea> OR RTE area form field, possibly with various control/validation features

Parameters:
string The table name of the record
string The field name which this element is supposed to edit
array The record data array where the value(s) for the field can be found
array An array with additional configuration options.
Returns:
string The HTML code for the TCEform field

Definition at line 1109 of file class.t3lib_tceforms.php.

References t3lib_parsehtml_proc::evalWriteFile(), t3lib_BEfunc::fixVersioningPid(), t3lib_div::formatForTextarea(), formWidthText(), getLL(), t3lib_BEfunc::getPagesTSconfig(), getSingleField_typeNone_render(), getSpecConfFromString(), t3lib_BEfunc::getSpecConfParametersFromArray(), t3lib_BEfunc::getTCAtypeValue(), getTSCpid(), t3lib_div::intInRange(), renderWizards(), t3lib_BEfunc::RTEgetObj(), and t3lib_BEfunc::RTEsetup().

Referenced by getSingleField_SW().

t3lib_TCEforms::getSingleField_typeCheck ( table,
field,
row,
&$  PA 
)

Generation of TCEform elements of the type "check" This will render a check-box OR an array of checkboxes

Parameters:
string The table name of the record
string The field name which this element is supposed to edit
array The record data array where the value(s) for the field can be found
array An array with additional configuration options.
Returns:
string The HTML code for the TCEform field

Definition at line 1230 of file class.t3lib_tceforms.php.

References checkBoxParams(), initItemArray(), insertDefStyle(), procItems(), and wrapLabels().

Referenced by getSingleField_SW().

t3lib_TCEforms::getSingleField_typeRadio ( table,
field,
row,
&$  PA 
)

Generation of TCEform elements of the type "radio" This will render a series of radio buttons.

Parameters:
string The table name of the record
string The field name which this element is supposed to edit
array The record data array where the value(s) for the field can be found
array An array with additional configuration options.
Returns:
string The HTML code for the TCEform field

Definition at line 1298 of file class.t3lib_tceforms.php.

References initItemArray(), and procItems().

Referenced by getSingleField_SW().

t3lib_TCEforms::getSingleField_typeSelect ( table,
field,
row,
&$  PA 
)

Generation of TCEform elements of the type "select" This will render a selector box element, or possibly a special construction with two selector boxes. That depends on configuration.

Parameters:
string The table name of the record
string The field name which this element is supposed to edit
array The record data array where the value(s) for the field can be found
array An array with additional configuration options.
Returns:
string The HTML code for the TCEform field

Definition at line 1334 of file class.t3lib_tceforms.php.

References addItems(), addSelectOptionsToItemArray(), getSingleField_typeSelect_checkbox(), getSingleField_typeSelect_multiple(), getSingleField_typeSelect_single(), getSingleField_typeSelect_singlebox(), getSpecConfFromString(), initItemArray(), t3lib_div::inList(), procItems(), renderWizards(), setTSconfig(), sL(), and t3lib_div::trimExplode().

Referenced by getSingleField_SW().

t3lib_TCEforms::getSingleField_typeSelect_single ( table,
field,
row,
&$  PA,
config,
selItems,
nMV_label 
)

Creates a single-selector box (Render function for getSingleField_typeSelect())

Parameters:
string See getSingleField_typeSelect()
string See getSingleField_typeSelect()
array See getSingleField_typeSelect()
array See getSingleField_typeSelect()
array (Redundant) content of $PA['fieldConf']['config'] (for convenience)
array Items available for selection
string Label for no-matching-value
Returns:
string The HTML code for the item
See also:
getSingleField_typeSelect()

Definition at line 1414 of file class.t3lib_tceforms.php.

References elName(), getIcon(), insertDefStyle(), and optionTagStyle().

Referenced by getSingleField_typeSelect().

t3lib_TCEforms::getSingleField_typeSelect_checkbox ( table,
field,
row,
&$  PA,
config,
selItems,
nMV_label 
)

Creates a checkbox list (renderMode = "checkbox") (Render function for getSingleField_typeSelect())

Parameters:
string See getSingleField_typeSelect()
string See getSingleField_typeSelect()
array See getSingleField_typeSelect()
array See getSingleField_typeSelect()
array (Redundant) content of $PA['fieldConf']['config'] (for convenience)
array Items available for selection
string Label for no-matching-value
Returns:
string The HTML code for the item
See also:
getSingleField_typeSelect()

Definition at line 1545 of file class.t3lib_tceforms.php.

References t3lib_div::deHSCentities(), elName(), extractValuesOnlyFromValueLabelList(), getIcon(), getLL(), and insertDefStyle().

Referenced by getSingleField_typeSelect().

t3lib_TCEforms::getSingleField_typeSelect_singlebox ( table,
field,
row,
&$  PA,
config,
selItems,
nMV_label 
)

Creates a selectorbox list (renderMode = "singlebox") (Render function for getSingleField_typeSelect())

Parameters:
string See getSingleField_typeSelect()
string See getSingleField_typeSelect()
array See getSingleField_typeSelect()
array See getSingleField_typeSelect()
array (Redundant) content of $PA['fieldConf']['config'] (for convenience)
array Items available for selection
string Label for no-matching-value
Returns:
string The HTML code for the item
See also:
getSingleField_typeSelect()

Definition at line 1664 of file class.t3lib_tceforms.php.

References t3lib_div::deHSCentities(), elName(), extractValuesOnlyFromValueLabelList(), getLL(), insertDefStyle(), t3lib_div::intInRange(), and optionTagStyle().

Referenced by getSingleField_typeSelect().

t3lib_TCEforms::getSingleField_typeSelect_multiple ( table,
field,
row,
&$  PA,
config,
selItems,
nMV_label 
)

Creates a multiple-selector box (two boxes, side-by-side) (Render function for getSingleField_typeSelect())

Parameters:
string See getSingleField_typeSelect()
string See getSingleField_typeSelect()
array See getSingleField_typeSelect()
array See getSingleField_typeSelect()
array (Redundant) content of $PA['fieldConf']['config'] (for convenience)
array Items available for selection
string Label for no-matching-value
Returns:
string The HTML code for the item
See also:
getSingleField_typeSelect()

Definition at line 1774 of file class.t3lib_tceforms.php.

References dbFileIcons(), getLL(), insertDefStyle(), t3lib_div::intInRange(), optionTagStyle(), sL(), and t3lib_div::trimExplode().

Referenced by getSingleField_typeSelect().

t3lib_TCEforms::getSingleField_typeGroup ( table,
field,
row,
&$  PA 
)

Generation of TCEform elements of the type "group" This will render a selectorbox into which elements from either the file system or database can be inserted. Relations.

Parameters:
string The table name of the record
string The field name which this element is supposed to edit
array The record data array where the value(s) for the field can be found
array An array with additional configuration options.
Returns:
string The HTML code for the TCEform field

Definition at line 1878 of file class.t3lib_tceforms.php.

References $perms_clause, dbFileIcons(), getClickMenu(), t3lib_div::getFileAbsFileName(), t3lib_BEfunc::getFileIcon(), t3lib_iconWorks::getIconImage(), getLL(), t3lib_BEfunc::getRecordTitle(), t3lib_BEfunc::getRecordWSOL(), getSpecConfFromString(), t3lib_div::intInRange(), renderWizards(), sL(), t3lib_BEfunc::splitTable_Uid(), and t3lib_div::trimExplode().

Referenced by getSingleField_SW().

t3lib_TCEforms::getSingleField_typeNone ( table,
field,
row,
&$  PA 
)

Generation of TCEform elements of the type "none" This will render a non-editable display of the content of the field.

Parameters:
string The table name of the record
string The field name which this element is supposed to edit
array The record data array where the value(s) for the field can be found
array An array with additional configuration options.
Returns:
string The HTML code for the TCEform field

Definition at line 2048 of file class.t3lib_tceforms.php.

References getSingleField_typeNone_render().

Referenced by getSingleField_SW().

t3lib_TCEforms::getSingleField_typeNone_render ( config,
itemValue 
)

HTML rendering of a value which is not editable.

Parameters:
array Configuration for the display
string The value to display
Returns:
string The HTML code for the display
See also: