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
Table of Contents
Properties
- $allowOverrideMatrix : array<string|int, mixed>
- 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
- getTSconfigForTableRow() : mixed
- Returns TSconfig for given table and row
- overrideFieldConf() : array<string|int, mixed>
- Overrides the TCA field configuration by TSconfig settings.
Properties
$allowOverrideMatrix
Whitelist that allows TCA field configuration to be overridden by TSconfig
protected
static array<string|int, mixed>
$allowOverrideMatrix
= ['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']]
Tags
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
getTSconfigForTableRow()
Returns TSconfig for given table and row
public
static getTSconfigForTableRow(string $table, array<string|int, mixed> $row[, string $field = '' ]) : mixed
Parameters
- $table : string
-
The table name
- $row : array<string|int, mixed>
-
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<string|int, mixed> $fieldConfig, array<string|int, mixed> $TSconfig) : array<string|int, mixed>
Example TSconfig: TCEform.