‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\Utility\FormEngineUtility Class Reference

Static Public Member Functions

static array overrideFieldConf ($fieldConfig, $TSconfig)
static mixed getTSconfigForTableRow ($table, $row, $field='')
static string getIconHtml ($icon, $alt='', $title='')

Static Protected Attributes

static array $allowOverrideMatrix

Detailed Description

This is a static, internal and intermediate helper class for various FormEngine related tasks.

This class was introduced to help disentangling FormEngine and its sub classes. It MUST NOT be used in other extensions and will change or vanish without further notice.

‪: These helpers are target to be dropped if further FormEngine refactoring is done

Definition at line 40 of file FormEngineUtility.php.

Member Function Documentation

◆ getIconHtml()

static string TYPO3\CMS\Backend\Form\Utility\FormEngineUtility::getIconHtml (   $icon,
  $alt = '',
  $title = '' 

Renders the $icon, supports a filename for skinImg or sprite-icon-name

string$icon‪The icon passed, could be a file-reference or a sprite Icon name
string$alt‪Alt attribute of the icon returned
string$title‪Title attribute of the icon return
‪string A tag representing to show the asked icon

Definition at line 134 of file FormEngineUtility.php.

References TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), and TYPO3\CMS\Core\Utility\PathUtility\isAbsolutePath().

Referenced by TYPO3\CMS\Backend\Form\FieldWizard\SelectIcons\render(), TYPO3\CMS\Backend\Form\FieldWizard\OtherLanguageThumbnails\render(), TYPO3\CMS\Backend\Form\Element\SelectCheckBoxElement\render(), and TYPO3\CMS\Backend\Form\Element\SelectSingleElement\render().

◆ getTSconfigForTableRow()

static mixed TYPO3\CMS\Backend\Form\Utility\FormEngineUtility::getTSconfigForTableRow (   $table,
  $field = '' 

Returns TSconfig for given table and row

string$table‪The table name
array$row‪The table row - Must at least contain the "uid" value, even if "NEW..." string. The "pid" field is important as well, negative values will be interpreted as pointing to a record from the same table.
string$field‪Optionally specify the field name as well. In that case the TSconfig for this field is returned.
‪mixed The TSconfig values - probably in an array

Definition at line 110 of file FormEngineUtility.php.

Referenced by TYPO3\CMS\Backend\Form\InlineStackProcessor\initializeByParsingDomObjectIdString().

◆ overrideFieldConf()

static array TYPO3\CMS\Backend\Form\Utility\FormEngineUtility::overrideFieldConf (   $fieldConfig,

Overrides the TCA field configuration by TSconfig settings.

Example TSconfig: TCEform.

<field>.config.appearance.useSortable = 1 This overrides the setting in $GLOBALS['TCA'][


array$fieldConfig‪$GLOBALS['TCA'] field configuration
‪array Changed TCA field configuration

Definition at line 79 of file FormEngineUtility.php.

Referenced by TYPO3\CMS\Backend\Form\InlineStackProcessor\initializeByParsingDomObjectIdString(), and TYPO3\CMS\Backend\Form\Container\SingleFieldContainer\render().

Member Data Documentation

◆ $allowOverrideMatrix

array TYPO3\CMS\Backend\Form\Utility\FormEngineUtility::$allowOverrideMatrix
Initial value:
= array(
'input' => ['size', 'max', 'readOnly'],
'number' => ['size', 'readOnly'],
'email' => ['size', 'readOnly'],
'link' => ['size', 'readOnly'],
'password' => ['size', 'readOnly'],
'datetime' => ['size', 'readOnly'],
'color' => ['size', 'readOnly'],
'uuid' => ['size', 'enableCopyToClipboard'],
'text' => ['cols', 'rows', 'wrap', 'max', 'readOnly'],
'json' => ['cols', 'rows', 'readOnly'],
'check' => ['cols', 'readOnly'],
'select' => ['size', 'autoSizeMax', 'maxitems', 'minitems', 'readOnly', 'treeConfig', 'fileFolderConfig'],
'category' => ['size', 'maxitems', 'minitems', 'readOnly', 'treeConfig'],
'group' => ['size', 'autoSizeMax', 'maxitems', 'minitems', 'readOnly', 'elementBrowserEntryPoints'],
'folder' => ['size', 'autoSizeMax', 'maxitems', 'minitems', 'readOnly', 'elementBrowserEntryPoints'],
'inline' => ['appearance', 'behaviour', 'foreign_label', 'foreign_selector', 'foreign_unique', 'maxitems', 'minitems', 'size', 'autoSizeMax', 'symmetric_label', 'readOnly'],
'file' => ['appearance', 'behaviour', 'maxitems', 'minitems', 'readOnly'],
'imageManipulation' => ['ratios', 'cropVariants'],

Whitelist that allows TCA field configuration to be overridden by TSconfig

See also

Definition at line 47 of file FormEngineUtility.php.