Documentation TYPO3 par Ameos

t3lib_TCEforms Class Reference

Inheritance diagram for t3lib_TCEforms:

Inheritance graph
[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)
 getRTypeNum ($table, $row)
 rearrange ($fields)
 getExcludeElements ($table, $row, $typeNum)
 getFieldsToAdd ($table, $row, $typeNum)
 mergeFieldsWithAddedFields ($fields, $fieldsToAdd)
 setTSconfig ($table, $row, $field='')
 getSpecConfForField ($table, $row, $field)
 getSpecConfFromString ($extraString, $defaultExtras)
 registerDefaultLanguageData ($table, $rec)
 renderDefaultLanguageContent ($table, $field, $row, $item)
 renderDefaultLanguageDiff ($table, $field, $row, $item)
 dbFileIcons ($fName, $mode, $allowed, $itemArray, $selector='', $params=array(), $onFocus='')
 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]')
 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)
 getTSCpid ($table, $uid, $pid)
 doLoadTableDescr ($table)
 getAvailableLanguages ($onlyIsoCoded=1, $setDefault=1)
 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)
 getRTypeNum ($table, $row)
 rearrange ($fields)
 getExcludeElements ($table, $row, $typeNum)
 getFieldsToAdd ($table, $row, $typeNum)
 mergeFieldsWithAddedFields ($fields, $fieldsToAdd)
 setTSconfig ($table, $row, $field='')
 getSpecConfForField ($table, $row, $field)
 getSpecConfFromString ($extraString, $defaultExtras)
 registerDefaultLanguageData ($table, $rec)
 renderDefaultLanguageContent ($table, $field, $row, $item)
 renderDefaultLanguageDiff ($table, $field, $row, $item)
 dbFileIcons ($fName, $mode, $allowed, $itemArray, $selector='', $params=array(), $onFocus='')
 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]')
 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)
 getTSCpid ($table, $uid, $pid)
 doLoadTableDescr ($table)
 getAvailableLanguages ($onlyIsoCoded=1, $setDefault=1)

Public Attributes

 $palFieldArr = array()
 $disableWizards = 0
 $isPalettedoc = 0
 $paletteMargin = 1
 $defStyle = ''
 $cachedTSconfig = array()
 $cachedTSconfig_fieldLevel = array()
 $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()
 $backPath = ''
 $returnUrl = ''
 $doSaveFieldName = ''
 $palettesCollapsed = 0
 $disableRTE = 0
 $globalShowHelp = 1
 $fieldOrder = ''
 $doPrintPalette = 1
 $clipObj = FALSE
 $enableClickMenu = FALSE
 $enableTabMenu = FALSE
 $form_rowsToStylewidth = 9.58
 $form_largeComp = 1.33
 $charsPerRow = 40
 $maxTextareaWidth = 48
 $maxInputWidth = 48
 $defaultMultipleSelectorStyle = 'width:250px;'
 $prependFormFieldNames = 'data'
 $prependFormFieldNames_file = 'data_files'
 $formName = 'editform'
 $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()
 $additionalCode_pre = array()
 $additionalJS_pre = array()
 $additionalJS_post = array()
 $additionalJS_submit = array()

Detailed Description

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


Constructor & Destructor Documentation

t3lib_TCEforms::t3lib_TCEforms  ) 
 

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

Returns:
void

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

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

t3lib_TCEforms::t3lib_TCEforms  ) 
 

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

Returns:
void

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

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


Member Function Documentation

t3lib_TCEforms::addItems items,
iArray
 

Merges items into an item-array

Parameters:
array The existing item array
array An array of items to add. NOTICE: The keys are mapped to values, and the values and mapped to be labels. No possibility of adding an icon.
Returns:
array The updated $item array

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

t3lib_TCEforms::addItems items,
iArray
 

Merges items into an item-array

Parameters:
array The existing item array
array An array of items to add. NOTICE: The keys are mapped to values, and the values and mapped to be labels. No possibility of adding an icon.
Returns:
array The updated $item array

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

t3lib_TCEforms::addSelectOptionsToItemArray items,
fieldValue,
TSconfig,
field
 

Add selector box items of more exotic kinds.

Parameters:
array The array of items (label,value,icon)
array The "columns" array for the field (from TCA)
array TSconfig for the table/row
string The fieldname
Returns:
array The $items array modified.

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

References t3lib_div::getAllFilesAndFoldersInPath(), t3lib_BEfunc::getExcludeFields(), t3lib_BEfunc::getExplicitAuthFieldValues(), t3lib_div::getFileAbsFileName(), t3lib_iconWorks::getIcon(), t3lib_BEfunc::getSystemLanguages(), t3lib_div::inList(), t3lib_div::intInRange(), t3lib_div::makeInstance(), t3lib_div::removePrefixPathFromList(), and t3lib_iconWorks::skinImg().

t3lib_TCEforms::addSelectOptionsToItemArray items,
fieldValue,
TSconfig,
field
 

Add selector box items of more exotic kinds.

Parameters:
array The array of items (label,value,icon)
array The "columns" array for the field (from TCA)
array TSconfig for the table/row
string The fieldname
Returns:
array The $items array modified.

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

References t3lib_div::getAllFilesAndFoldersInPath(), t3lib_BEfunc::getExcludeFields(), t3lib_BEfunc::getExplicitAuthFieldValues(), t3lib_div::getFileAbsFileName(), t3lib_iconWorks::getIcon(), t3lib_BEfunc::getSystemLanguages(), t3lib_div::inList(), t3lib_div::intInRange(), t3lib_div::makeInstance(), t3lib_div::removePrefixPathFromList(), and t3lib_iconWorks::skinImg().

t3lib_TCEforms::addSelectOptionsToItemArray_makeModuleData value  ) 
 

Creates value/label pair for a backend module (main and sub)

Parameters:
string The module key
Returns:
string The rawurlencoded 2-part string to transfer to interface private
See also:
addSelectOptionsToItemArray()

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

t3lib_TCEforms::addSelectOptionsToItemArray_makeModuleData value  ) 
 

Creates value/label pair for a backend module (main and sub)

Parameters:
string The module key
Returns:
string The rawurlencoded 2-part string to transfer to interface private
See also:
addSelectOptionsToItemArray()

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

t3lib_TCEforms::addUserTemplateMarkers marker,
table,
field,
row,
&$  PA
 

Overwrite this function in own extended class to add own markers for output

Parameters:
array Array with key/value pairs to insert in the template.
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:
array marker array for template output
See also:
function intoTemplate()

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

t3lib_TCEforms::addUserTemplateMarkers marker,
table,
field,
row,
&$  PA
 

Overwrite this function in own extended class to add own markers for output

Parameters:
array Array with key/value pairs to insert in the template.
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:
array marker array for template output
See also:
function intoTemplate()

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

Referenced by getSingleField().

t3lib_TCEforms::blur  ) 
 

Returns 'this.blur();' string, if supported.

Returns:
string If the current browser supports styles, the string 'this.blur();' is returned.

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

t3lib_TCEforms::blur  ) 
 

Returns 'this.blur();' string, if supported.

Returns:
string If the current browser supports styles, the string 'this.blur();' is returned.

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

t3lib_TCEforms::checkBoxParams itemName,
thisValue,
c,
iCount,
addFunc = ''
 

Creates checkbox parameters

Parameters:
string Form element name
integer The value of the checkbox (representing checkboxes with the bits)
integer Checkbox # (0-9?)
integer Total number of checkboxes in the array.
string Additional JavaScript for the onclick handler.
Returns:
string The onclick attribute + possibly the checked-option set.

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

t3lib_TCEforms::checkBoxParams itemName,
thisValue,
c,
iCount,
addFunc = ''
 

Creates checkbox parameters

Parameters:
string Form element name
integer The value of the checkbox (representing checkboxes with the bits)
integer Checkbox # (0-9?)
integer Total number of checkboxes in the array.
string Additional JavaScript for the onclick handler.
Returns:
string The onclick attribute + possibly the checked-option set.

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

Referenced by getSingleField_typeCheck().

t3lib_TCEforms::dbFileCon formObj = 'document.forms[0]'  ) 
 

Used to connect the db/file browser with this document and the formfields on it!

Parameters:
string Form object reference (including "document.")
Returns:
string JavaScript functions/code (NOT contained in a <script>-element)

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

t3lib_TCEforms::dbFileCon formObj = 'document.forms[0]'  ) 
 

Used to connect the db/file browser with this document and the formfields on it!

Parameters:
string Form object reference (including "document.")
Returns:
string JavaScript functions/code (NOT contained in a <script>-element)

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

t3lib_TCEforms::dbFileIcons fName,
mode,
allowed,
itemArray,
selector = '',
params = array(),
onFocus = ''
 

Prints the selector box form-field for the db/file/select elements (multiple)

Parameters:
string Form element name
string Mode "db", "file" (internal_type for the "group" type) OR blank (then for the "select" type)
string Commalist of "allowed"
array The array of items. For "select" and "group"/"file" this is just a set of value. For "db" its an array of arrays with table/uid pairs.
string Alternative selector box.
array An array of additional parameters, eg: "size", "info", "headers" (array with "selector" and "items"), "noBrowser", "thumbnails"
string On focus attribute string
Returns:
string The form fields for the selection.

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

References t3lib_div::fixed_lgd_cs(), t3lib_BEfunc::getRecord(), t3lib_BEfunc::getRecordTitle(), and t3lib_div::intInRange().

t3lib_TCEforms::dbFileIcons fName,
mode,
allowed,
itemArray,
selector = '',
params = array(),
onFocus = ''
 

Prints the selector box form-field for the db/file/select elements (multiple)

Parameters:
string Form element name
string Mode "db", "file" (internal_type for the "group" type) OR blank (then for the "select" type)
string Commalist of "allowed"
array The array of items. For "select" and "group"/"file" this is just a set of value. For "db" its an array of arrays with table/uid pairs.
string Alternative selector box.
array An array of additional parameters, eg: "size", "info", "headers" (array with "selector" and "items"), "noBrowser", "thumbnails"
string On focus attribute string
Returns:
string The form fields for the selection.

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

References t3lib_div::fixed_lgd_cs(), t3lib_BEfunc::getRecord(), t3lib_BEfunc::getRecordTitle(), and t3lib_div::intInRange().

t3lib_TCEforms::doLoadTableDescr table  ) 
 

Returns true if descriptions should be loaded always

Parameters:
string Table for which to check
Returns:
boolean

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

t3lib_TCEforms::doLoadTableDescr table  ) 
 

Returns true if descriptions should be loaded always

Parameters:
string Table for which to check
Returns:
boolean

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

Referenced by getListedFields(), and getMainFields().

t3lib_TCEforms::elName itemName  ) 
 

Returns element reference for form element name

Parameters:
string Form element name
Returns:
string Form element reference (JS)

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

t3lib_TCEforms::elName <