FormEngineUtility

class \TYPO3\CMS\Backend\Form\Utility\FormEngineUtility

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.

Tags

todo:

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

Table of Contents

Properties

$allowOverrideMatrix  : array
Whitelist that allows TCA field configuration to be overridden by TSconfig

Methods

getIconHtml()  : string
Renders the $icon, supports a filename for skinImg or sprite-icon-name
getTCEFORM_TSconfig()  : array
Returns TSConfig for the TCEFORM object in page TSconfig.
getTSconfigForTableRow()  : mixed
Returns TSconfig for given table and row
overrideFieldConf()  : array
Overrides the TCA field configuration by TSconfig settings.

Properties

$allowOverrideMatrix

Whitelist that allows TCA field configuration to be overridden by TSconfig

protected static array $allowOverrideMatrix = ['input' => ['size', 'max', 'readOnly'], 'number' => ['size'…
Show the full value['input' => ['size', 'max', 'readOnly'], 'number' => ['size', 'readOnly'], 'email' => ['size', 'readOnly'], 'link' => ['size', 'readOnly'], 'password' => ['size', 'readOnly'], 'datetime' => ['size', 'readOnly'], 'color' => ['size', 'readOnly'], 'uuid' => ['size', 'appearance', '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']]

Tags

see
overrideFieldConf()

Methods

getIconHtml()

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

public static getIconHtml(string $icon[, string $alt = '' ][, string $title = '' ]) : string

Parameters

$icon : string

The icon passed, could be a file-reference or a sprite Icon name

$alt : string = ''

Alt attribute of the icon returned

$title : string = ''

Title attribute of the icon return

Return values

string —

A tag representing to show the asked icon

getTCEFORM_TSconfig()

Returns TSConfig for the TCEFORM object in page TSconfig.

public static getTCEFORM_TSconfig(string $table, array $row) : array

Used in TCEFORMs

Parameters

$table : string

Table name present in TCA

$row : array

Row from table

Return values

array

getTSconfigForTableRow()

Returns TSconfig for given table and row

public static getTSconfigForTableRow(string $table, array $row[, string $field = '' ]) : mixed

Parameters

$table : string

The table name

$row : array

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.

$field : string = ''

Optionally specify the field name as well. In that case the TSconfig for this field is returned.

Return values

mixed —

The TSconfig values - probably in an array

overrideFieldConf()

Overrides the TCA field configuration by TSconfig settings.

public static overrideFieldConf(array $fieldConfig, array $TSconfig) : array

Example TSconfig: TCEform.

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

Parameters

$fieldConfig : array

$GLOBALS['TCA'] field configuration

$TSconfig : array

TSconfig

Return values

array —

Changed TCA field configuration

On this page