TYPO3  7.6
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
FormEngineUtility Class Reference

Static Public Member Functions

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 getLanguageService ()
 
static getDatabaseConnection ()
 
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 39 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 217 of file FormEngineUtility.php.

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

static getBackendUserAuthentication ( )
staticprotected
Returns
BackendUserAuthentication

Definition at line 257 of file FormEngineUtility.php.

References $GLOBALS.

static getDatabaseConnection ( )
staticprotected
Returns
DatabaseConnection

Definition at line 249 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 123 of file FormEngineUtility.php.

References StringUtility\beginsWith(), elseif, StringUtility\endsWith(), GeneralUtility\getFileAbsFileName(), GeneralUtility\makeInstance(), GeneralUtility\resolveBackPath(), Icon\SIZE_SMALL, and PathUtility\stripPathSitePrefix().

Referenced by CreatePagesWizardModuleFunctionController\getTypeSelectHtml(), and SelectCheckBoxElement\render().

static getLanguageService ( )
staticprotected
Returns
LanguageService

Definition at line 241 of file FormEngineUtility.php.

References $GLOBALS.

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

References BackendUtility\getTCEFORM_TSconfig().

Referenced by InlineStackProcessor\initializeByParsingDomObjectIdString().

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

Member Data Documentation

$allowOverrideMatrix
staticprotected
Initial value:
= array(
'input' => array('size', 'max', 'readOnly'),
'text' => array('cols', 'rows', 'wrap', 'readOnly'),
'check' => array('cols', 'showIfRTE', 'readOnly'),
'select' => array('size', 'autoSizeMax', 'maxitems', 'minitems', 'readOnly', 'treeConfig'),
'group' => array('size', 'autoSizeMax', 'max_size', 'show_thumbs', 'maxitems', 'minitems', 'disable_controls', 'readOnly'),
'inline' => array('appearance', 'behaviour', 'foreign_label', 'foreign_selector', 'foreign_unique', 'maxitems', 'minitems', 'size', 'autoSizeMax', 'symmetric_label', 'readOnly'),
)

Definition at line 47 of file FormEngineUtility.php.