Solutions Open Source

Référence de la classe t3lib_TCEforms

Graphe d'héritage de t3lib_TCEforms:

Inheritance graph
[légende]

Liste de tous les membres

Fonctions membres publiques

 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 ()
 pushToDynNestedStack ($type, $ident)
 popFromDynNestedStack ($type=null, $ident=null)
 getDynNestedStack ($json=false, $skipFirst=false)

Attributs publics

 $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()
 $dynNestedStack = array()
 $additionalCode_pre = array()
 $additionalJS_pre = array()
 $additionalJS_post = array()
 $additionalJS_submit = array()
 $inline
 $hookObjectsMainFields = array()
 $hookObjectsSingleField = array()
 $extraFormHeaders = array()


Documentation des fonctions membres

t3lib_TCEforms::t3lib_TCEforms (  ) 

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

Renvoie:
void

t3lib_TCEforms::initDefaultBEmode (  ) 

Initialize various internal variables.

Renvoie:
void

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

Paramètres:
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.
Renvoie:
string HTML output
Voir également:
getMainFields()

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.

Paramètres:
string The table name
array The record from the table for which to render a field.
integer Depth level
Renvoie:
string HTML output
Voir également:
getSoloField()

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.

Paramètres:
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.
Renvoie:
string TCEform elements in a string.

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

Creates a palette (collection of secondary options).

Paramètres:
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).
Renvoie:
string HTML code.

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

Returns the form HTML code for a database table field.

Paramètres:
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.
Renvoie:
mixed String (normal) or array (palettes)

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

Rendering a single item for the form

Paramètres:
string Table name of record
string Fieldname to render
array The record
array parameters array containing a lot of stuff. Value by Reference!
Renvoie:
string Returns the item as HTML code to insert private
Voir également:
getSingleField(), 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

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

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

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

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

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

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

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

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

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.

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

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

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

Paramètres:
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
Renvoie:
string The HTML code for the item
Voir également:
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())

Paramètres:
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
Renvoie:
string The HTML code for the item
Voir également:
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())

Paramètres:
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
Renvoie:
string The HTML code for the item
Voir également:
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())

Paramètres:
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
Renvoie:
string The HTML code for the item
Voir également:
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.

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

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.

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

t3lib_TCEforms::getSingleField_typeNone_render ( config,
itemValue 
)

HTML rendering of a value which is not editable.

Paramètres:
array Configuration for the display
string The value to display
Renvoie:
string The HTML code for the display
Voir également:
getSingleField_typeNone();

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

Handler for Flex Forms

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

t3lib_TCEforms::getSingleField_typeFlex_langMenu ( languages,
elName,
selectedLanguage,
multi = 1 
)

Creates the language menu for FlexForms:

Paramètres:
[type] $languages: ...
[type] $elName: ...
[type] $selectedLanguage: ...
[type] $multi: ...
Renvoie:
string HTML for menu

t3lib_TCEforms::getSingleField_typeFlex_sheetMenu ( sArr,
elName,
sheetKey 
)

Creates the menu for selection of the sheets:

Paramètres:
array Sheet array for which to render the menu
string Form element name of the field containing the sheet pointer
string Current sheet key
Renvoie:
string HTML for menu

t3lib_TCEforms::getSingleField_typeFlex_draw ( dataStruct,
editData,
cmdData,
table,
field,
row,
&$  PA,
formPrefix = '',
level = 0,
tRows = array() 
)

[Describe function...]

Paramètres:
[type] $dataStruct: ...
[type] $editData: ...
[type] $cmdData: ...
[type] $table: ...
[type] $field: ...
[type] $row: ...
[type] $PA: ...
[type] $formPrefix: ...
[type] $level: ...
[type] $tRows: ...
Renvoie:
[type] ...

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

Handler for unknown types.

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

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

User defined field type

Paramètres:
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.
Renvoie:
string The HTML code for the TCEform field

t3lib_TCEforms::formatValue ( config,
itemValue 
)

Format field content of various types if $config['format'] is set to date, filesize, ..., user This is primarily for the field type none but can be used for user field types for example

Paramètres:
array Configuration for the display
string The value to display
Renvoie:
string Formatted Field content

t3lib_TCEforms::getRTypeNum ( table,
row 
)

Calculate and return the current "types" pointer value for a record

Paramètres:
string The table name. MUST be in $TCA
array The row from the table, should contain at least the "type" field, if applicable.
Renvoie:
string Return the "type" value for this record, ready to pick a "types" configuration from the $TCA array.

t3lib_TCEforms::rearrange ( fields  ) 

Used to adhoc-rearrange the field order normally set in the [types][showitem] list

Paramètres:
array A [types][showitem] list of fields, exploded by ","
Renvoie:
array Returns rearranged version (keys are changed around as well.)
Voir également:
getMainFields()

t3lib_TCEforms::getExcludeElements ( table,
row,
typeNum 
)

Producing an array of field names NOT to display in the form, based on settings from subtype_value_field, bitmask_excludelist_bits etc. Notice, this list is in NO way related to the "excludeField" flag

Paramètres:
string Table name, MUST be in $TCA
array A record from table.
string A "type" pointer value, probably the one calculated based on the record array.
Renvoie:
array Array with fieldnames as values. The fieldnames are those which should NOT be displayed "anyways"
Voir également:
getMainFields()

t3lib_TCEforms::getFieldsToAdd ( table,
row,
typeNum 
)

Finds possible field to add to the form, based on subtype fields.

Paramètres:
string Table name, MUST be in $TCA
array A record from table.
string A "type" pointer value, probably the one calculated based on the record array.
Renvoie:
array An array containing two values: 1) Another array containing fieldnames to add and 2) the subtype value field.
Voir également:
getMainFields()

t3lib_TCEforms::mergeFieldsWithAddedFields ( fields,
fieldsToAdd 
)

Merges the current [types][showitem] array with the array of fields to add for the current subtype field of the "type" value.

Paramètres:
array A [types][showitem] list of fields, exploded by ","
array The output from getFieldsToAdd()
Renvoie:
array Return the modified $fields array.
Voir également:
getMainFields(),getFieldsToAdd()

t3lib_TCEforms::setTSconfig ( table,
row,
field = '' 
)

Returns TSconfig for table/row Multiple requests to this function will return cached content so there is no performance loss in calling this many times since the information is looked up only once.

Paramètres:
string The table name
array The table row (Should at least contain the "uid" value, even if "NEW..." string. The "pid" field is important as well, and negative values will be intepreted as pointing to a record from the same table.)
string Optionally you can specify the field name as well. In that case the TSconfig for the field is returned.
Renvoie:
mixed The TSconfig values (probably in an array)
Voir également:
t3lib_BEfunc::getTCEFORM_TSconfig()

t3lib_TCEforms::overrideFieldConf ( fieldConfig,
TSconfig 
)

Overrides the TCA field configuration by TSconfig settings.

Example TSconfig: TCEform.
<field>.config.appearance.useSortable = 1 This overrides the setting in $TCA[
['columns'][<field>]['config']['appearance']['useSortable'].

Paramètres:
array $fieldConfig: TCA field configuration
array $TSconfig: TSconfig
Renvoie:
array Changed TCA field configuration

t3lib_TCEforms::getSpecConfForField ( table,
row,
field 
)

Returns the "special" configuration (from the "types" "showitem" list) for a fieldname based on input table/record (Not used anywhere...?)

Paramètres:
string The table name
array The table row (Should at least contain the "uid" value, even if "NEW..." string. The "pid" field is important as well, and negative values will be intepreted as pointing to a record from the same table.)
string Specify the field name.
Renvoie:
array
Voir également:
getSpecConfFromString(), t3lib_BEfunc::getTCAtypes()

t3lib_TCEforms::getSpecConfFromString ( extraString,
defaultExtras 
)

Returns the "special" configuration of an "extra" string (non-parsed)

Paramètres:
string The "Part 4" of the fields configuration in "types" "showitem" lists.
string The ['defaultExtras'] value from field configuration
Renvoie:
array An array with the special options in.
Voir également:
getSpecConfForField(), t3lib_BEfunc::getSpecConfParts()

t3lib_TCEforms::registerDefaultLanguageData ( table,
rec 
)

Will register data from original language records if the current record is a translation of another. The original data is shown with the edited record in the form. The information also includes possibly diff-views of what changed in the original record. Function called from outside (see alt_doc.php + quick edit) before rendering a form for a record

Paramètres:
string Table name of the record being edited
array Record array of the record being edited
Renvoie:
void

t3lib_TCEforms::getLangu