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

Public Member Functions

 setFormBuilder (FormBuilder $formBuilder)
 
 setGlobalLayoutConfiguration ($layout=array())
 
 getGlobalLayoutByElementType ($elementType)
 
 setElementLayouts (Element $element, array $userConfiguredElementTyposcript=array())
 
 getNewAttributeName ($elementType, $attributeName)
 

Protected Member Functions

 replaceLabelContent ($scope= '', array $messages)
 
 getDescriptionElementLayouts (Element $element, $scope= 'label')
 
 getElementClassFromLayout ($elementType= '', $tagName= '')
 
 determineElementOuterWraps ($elementType, $elementLayout= '')
 
 replaceTagWithMarker ($tagName, $stopTag= 'body', $html= '')
 

Protected Attributes

 $layout = array()
 
 $formBuilder
 
 $registeredFormElements
 
 $elementsWithoutLabel
 
 $containerElements
 

Detailed Description

Compatibility layer. Used in the scope of one(!) specific form element.

Definition at line 25 of file CompatibilityLayerUtility.php.

Member Function Documentation

determineElementOuterWraps (   $elementType,
  $elementLayout = '' 
)
protected

Try to explode the element layout into 2 parts to get the outer wrapping

Parameters
string$elementType
string$elementLayout
Returns
string
Deprecated:
since TYPO3 CMS 7, this function will be removed in TYPO3 CMS 8, as the functionality is now done via fluid

Definition at line 607 of file CompatibilityLayerUtility.php.

References elseif, and CompatibilityLayerUtility\replaceTagWithMarker().

Referenced by CompatibilityLayerUtility\setElementLayouts().

getDescriptionElementLayouts ( Element  $element,
  $scope = 'label' 
)
protected

Replace <labelvalue> or <legendvalue>, <mandatory> and <error> in a label / legend with the associated content. Return the replaced <label> / <legend> layout and the replaced <mandatory> and <error> layout.

Parameters
\TYPO3\CMS\Form\Domain\Model\Element$element
string$scope
Returns
array

Definition at line 517 of file CompatibilityLayerUtility.php.

References Element\getAdditionalArgument(), CompatibilityLayerUtility\getGlobalLayoutByElementType(), Element\getName(), Element\getValidationErrorMessages(), CompatibilityLayerUtility\replaceLabelContent(), and CompatibilityLayerUtility\replaceTagWithMarker().

Referenced by CompatibilityLayerUtility\setElementLayouts().

getElementClassFromLayout (   $elementType = '',
  $tagName = '' 
)
protected

Return the class attribute for a element defined by layout.

Parameters
string$elementType
string$tagName
Returns
string

Definition at line 575 of file CompatibilityLayerUtility.php.

Referenced by CompatibilityLayerUtility\setElementLayouts().

getGlobalLayoutByElementType (   $elementType)

Get the layout of the object Looks if there is an assigned layout by configuration of the element otherwise it will look if there is a layout set in the form configuration.

Parameters
string$elementTypeType of element e.g BUTTON
Returns
string The element layout
Deprecated:
since TYPO3 CMS 7, this function will be removed in TYPO3 CMS 8, as the functionality is now done via fluid

Definition at line 130 of file CompatibilityLayerUtility.php.

References CompatibilityLayerUtility\$layout, GeneralUtility\deprecationLog(), and elseif.

Referenced by CompatibilityLayerUtility\getDescriptionElementLayouts(), CompatibilityLayerUtility\replaceLabelContent(), and CompatibilityLayerUtility\setElementLayouts().

getNewAttributeName (   $elementType,
  $attributeName 
)

Get new name for some old inconsistent attribute names

Parameters
string$elementType
string$attributeName
Returns
string
Deprecated:
since TYPO3 CMS 7, this function will be removed in TYPO3 CMS 8, as the functionality is now done via fluid

Definition at line 719 of file CompatibilityLayerUtility.php.

References GeneralUtility\deprecationLog(), and elseif.

replaceLabelContent (   $scope = '',
array  $messages 
)
protected

Replace the message sections of a label. The scopes can be mandatory or error.

Parameters
string$scope
array$messages
Returns
string

Definition at line 499 of file CompatibilityLayerUtility.php.

References CompatibilityLayerUtility\getGlobalLayoutByElementType(), and CompatibilityLayerUtility\replaceTagWithMarker().

Referenced by CompatibilityLayerUtility\getDescriptionElementLayouts().

replaceTagWithMarker (   $tagName,
  $stopTag = 'body',
  $html = '' 
)
protected

Replace a html tag with a unique marker

Parameters
string$tagName
string$stopTag
string$html
Returns
array

Definition at line 647 of file CompatibilityLayerUtility.php.

Referenced by CompatibilityLayerUtility\determineElementOuterWraps(), CompatibilityLayerUtility\getDescriptionElementLayouts(), CompatibilityLayerUtility\replaceLabelContent(), and CompatibilityLayerUtility\setElementLayouts().

setElementLayouts ( Element  $element,
array  $userConfiguredElementTyposcript = array() 
)
setFormBuilder ( FormBuilder  $formBuilder)
Parameters
FormBuilder$formBuilder

Definition at line 98 of file CompatibilityLayerUtility.php.

References CompatibilityLayerUtility\$formBuilder.

setGlobalLayoutConfiguration (   $layout = array())

Set the layout configuration for one or more elements

Parameters
NULL | array$layoutThe configuration array
Returns
void
Deprecated:
since TYPO3 CMS 7, this function will be removed in TYPO3 CMS 8, as the functionality is now done via fluid

Definition at line 110 of file CompatibilityLayerUtility.php.

References CompatibilityLayerUtility\$layout, and GeneralUtility\deprecationLog().

Member Data Documentation

$containerElements
protected
Initial value:
= array(
'FIELDSET',
'RADIOGROUP',
'CHECKBOXGROUP',
)

Definition at line 89 of file CompatibilityLayerUtility.php.

Referenced by CompatibilityLayerUtility\setElementLayouts().

$elementsWithoutLabel
protected
Initial value:
= array(
'HIDDEN',
'CONTENTELEMENT',
'TEXTBLOCK',
'FIELDSET',
'RADIOGROUP',
'CHECKBOXGROUP',
)

Definition at line 77 of file CompatibilityLayerUtility.php.

Referenced by CompatibilityLayerUtility\setElementLayouts().

$formBuilder
protected
$layout = array()
protected
$registeredFormElements
protected
Initial value:
= array(
'TEXTLINE',
'SUBMIT',
'RESET',
'RADIO',
'PASSWORD',
'IMAGEBUTTON',
'FILEUPLOAD',
'CHECKBOX',
'BUTTON',
'TEXTAREA',
'HIDDEN',
'CONTENTELEMENT',
'TEXTBLOCK',
'SELECT',
'FIELDSET',
'RADIOGROUP',
'CHECKBOXGROUP',
)

Definition at line 54 of file CompatibilityLayerUtility.php.

Referenced by CompatibilityLayerUtility\setElementLayouts().