‪TYPO3CMS  11.5
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 38 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 122 of file FormEngineUtility.php.

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

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 98 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 67 of file FormEngineUtility.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

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'],
'text' => ['cols', 'rows', 'wrap', 'max', 'readOnly'],
'check' => ['cols', 'readOnly'],
'select' => ['size', 'autoSizeMax', 'maxitems', 'minitems', 'readOnly', 'treeConfig', 'fileFolderConfig'],
'category' => ['size', 'maxitems', 'minitems', 'readOnly', 'treeConfig'],
'group' => ['size', 'autoSizeMax', 'max_size', 'maxitems', 'minitems', 'readOnly'],
'inline' => ['appearance', 'behaviour', 'foreign_label', 'foreign_selector', 'foreign_unique', 'maxitems', 'minitems', 'size', 'autoSizeMax', 'symmetric_label', 'readOnly'],
'imageManipulation' => ['ratios', 'cropVariants'],

Whitelist that allows TCA field configuration to be overridden by TSconfig

See also

Definition at line 45 of file FormEngineUtility.php.