TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FormEngineUtility Class Reference

Static Public Member Functions

static static overrideFieldConf ($fieldConfig, $TSconfig)
 
static getTSconfigForTableRow ($table, $row, $field= '')
 
static getIconHtml ($icon, $alt= '', $title= '')
 
static updateInlineView (&$uc, $tce)
 
static databaseRowCompatibility (array $row)
 

Static Protected Member Functions

static getBackendUserAuthentication ()
 

Static Protected Attributes

static $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.

Definition at line 37 of file FormEngineUtility.php.

Member Function Documentation

static databaseRowCompatibility ( array  $row)
static

Compatibility layer for methods not in FormEngine scope.

databaseRow was a flat array with single elements in select and group fields as comma separated list. With new data handling in FormEngine, this is now an array of element values. There are however "old" methods that still expect the flat array. This method implodes the array again to fake the old behavior of a database row before it is given to those methods.

Parameters
array$rowIncoming array
Returns
array Flat array

Definition at line 202 of file FormEngineUtility.php.

Referenced by FormEngineUtilityTest\databaseRowCompatibilityImplodesSelectArrayWithValuesAtSecondPosition(), FormEngineUtilityTest\databaseRowCompatibilityImplodesSimpleArray(), and FormEngineUtilityTest\databaseRowCompatibilityKeepsSimpleValue().

static getBackendUserAuthentication ( )
staticprotected
Returns
BackendUserAuthentication

Definition at line 226 of file FormEngineUtility.php.

References $GLOBALS.

static getIconHtml (   $icon,
  $alt = '',
  $title = '' 
)
static

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

Parameters
string$iconThe icon passed, could be a file-reference or a sprite Icon name
string$altAlt attribute of the icon returned
string$titleTitle attribute of the icon return
Returns
string A tag representing to show the asked icon

Definition at line 122 of file FormEngineUtility.php.

References StringUtility\endsWith(), PathUtility\getAbsoluteWebPath(), GeneralUtility\getFileAbsFileName(), GeneralUtility\makeInstance(), and Icon\SIZE_SMALL.

Referenced by SelectCheckBoxElement\render().

static getTSconfigForTableRow (   $table,
  $row,
  $field = '' 
)
static

Returns TSconfig for given table and row

Parameters
string$tableThe table name
array$rowThe 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$fieldOptionally specify the field name as well. In that case the TSconfig for this field is returned.
Returns
mixed The TSconfig values - probably in an array

Definition at line 97 of file FormEngineUtility.php.

References BackendUtility\getTCEFORM_TSconfig().

Referenced by InlineStackProcessor\initializeByParsingDomObjectIdString().

static static overrideFieldConf (   $fieldConfig,
  $TSconfig 
)
static

Overrides the TCA field configuration by TSconfig settings.

Example TSconfig: TCEform.

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

['columns'][<field>]['config']['appearance']['useSortable'].

Parameters
array$fieldConfig$GLOBALS['TCA'] field configuration
array$TSconfigTSconfig
Returns
array Changed TCA field configuration

Definition at line 66 of file FormEngineUtility.php.

References ArrayUtility\mergeRecursiveWithOverrule(), and GeneralUtility\removeDotsFromTS().

Referenced by InlineStackProcessor\initializeByParsingDomObjectIdString().

static updateInlineView ( $uc,
  $tce 
)
static

Update expanded/collapsed states on new inline records if any.

Parameters
array$ucThe uc array to be processed and saved (by reference)
\TYPO3\CMS\Core\DataHandling\DataHandler$tceInstance of FormEngine that saved data before
Returns
void

Definition at line 154 of file FormEngineUtility.php.

Member Data Documentation

$allowOverrideMatrix
staticprotected
Initial value:
= [
'input' => ['size', 'max', 'readOnly']

Definition at line 45 of file FormEngineUtility.php.