TYPO3  7.6
Protected Member Functions | List of all members
SingleFieldContainer Class Reference
Inheritance diagram for SingleFieldContainer:
AbstractContainer AbstractNode NodeInterface

Protected Member Functions

 renderDefaultLanguageDiff ($table, $field, $row, $item)
 
 arrayCompareComplex ($subjectArray, $searchArray, $type= '')
 
 isAssociativeArray ($object)
 
 getBackendUserAuthentication ()
 
 getLanguageService ()
 
- Protected Member Functions inherited from AbstractContainer
 explodeSingleFieldShowItemConfiguration ($field)
 
 renderTabMenu (array $menuItems, $domId, $defaultTabIndex=1)
 
 previewFieldValue ($value, $config, $field= '')
 
- Protected Member Functions inherited from AbstractNode
 initializeResultArray ()
 
 mergeChildReturnIntoExistingResult (array $existing, array $childReturn)
 
 getValidationDataAsDataAttribute (array $config)
 
 getValidationDataAsJsonString (array $config)
 

Additional Inherited Members

- Public Member Functions inherited from AbstractContainer
 __construct (NodeFactory $nodeFactory, array $data)
 
- Protected Attributes inherited from AbstractContainer
 $nodeFactory
 

Detailed Description

Container around a "single field".

This container is the last one in the chain before processing is handed over to single element classes. If a single field is of type flex or inline, it however creates FlexFormEntryContainer or InlineControlContainer.

The container does various checks and processing for a given single fields, for example it resolves display conditions and the HTML to compare different languages.

Definition at line 37 of file SingleFieldContainer.php.

Member Function Documentation

arrayCompareComplex (   $subjectArray,
  $searchArray,
  $type = '' 
)
protected

Handles complex comparison requests on an array. A request could look like the following:

$searchArray = array( 'AND' => array( 'key1' => 'value1', 'key2' => 'value2', 'OR' => array( 'subarray' => array( 'subkey' => 'subvalue' ), 'key3' => 'value3', 'key4' => 'value4' ) ) );

It is possible to use the array keys 'AND.1', 'AND.2', etc. to prevent overwriting the sub-array. It could be necessary, if you use complex comparisons.

The example above means, key1 AND key2 (and their values) have to match with the $subjectArray and additional one OR key3 or key4 have to meet the same condition. It is also possible to compare parts of a sub-array (e.g. "subarray"), so this function recurses down one level in that sub-array.

Parameters
array$subjectArrayThe array to search in
array$searchArrayThe array with keys and values to search for
string$typeUse 'AND' or 'OR' for comparison
Returns
bool The result of the comparison

Definition at line 532 of file SingleFieldContainer.php.

References elseif, and SingleFieldContainer\isAssociativeArray().

getBackendUserAuthentication ( )
protected
Returns
BackendUserAuthentication

Definition at line 597 of file SingleFieldContainer.php.

References $GLOBALS.

getLanguageService ( )
protected
Returns
LanguageService

Definition at line 605 of file SingleFieldContainer.php.

References $GLOBALS.

Referenced by SingleFieldContainer\renderDefaultLanguageDiff().

isAssociativeArray (   $object)
protected

Checks whether an object is an associative array.

Parameters
mixed$objectThe object to be checked
Returns
bool Returns TRUE, if the object is an associative array

Definition at line 589 of file SingleFieldContainer.php.

Referenced by SingleFieldContainer\arrayCompareComplex().

renderDefaultLanguageDiff (   $table,
  $field,
  $row,
  $item 
)
protected

Renders the diff-view of default language record content compared with what the record was originally translated from. Will render content if any is found in the internal array

Parameters
string$tableTable name of the record being edited
string$fieldField name represented by $item
array$rowRecord array of the record being edited
string$itemHTML of the form field. This is what we add the content to.
Returns
string Item string returned again, possibly with the original value added to.

Definition at line 390 of file SingleFieldContainer.php.

References SingleFieldContainer\getLanguageService(), and GeneralUtility\makeInstance().