‪TYPO3CMS  10.4
TYPO3\CMS\Form\Domain\Model\FormElements\Section Class Reference
Inheritance diagram for TYPO3\CMS\Form\Domain\Model\FormElements\Section:
TYPO3\CMS\Form\Domain\Model\FormElements\AbstractSection TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface TYPO3\CMS\Form\Domain\Model\Renderable\AbstractCompositeRenderable TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable TYPO3\CMS\Form\Domain\Model\Renderable\CompositeRenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\VariableRenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface TYPO3\CMS\Form\Domain\Model\FormElements\GridRow

Public Member Functions

 initializeFormElement ()
 
string getUniqueIdentifier ()
 
mixed getDefaultValue ()
 
 setDefaultValue ($defaultValue)
 
array getProperties ()
 
 setProperty (string $key, $value)
 
bool isRequired ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Model\FormElements\AbstractSection
 __construct (string $identifier, string $type)
 
FormElementInterface[] getElements ()
 
FormElementInterface[] getElementsRecursively ()
 
 addElement (FormElementInterface $formElement)
 
FormElementInterface createElement (string $identifier, string $typeName)
 
 moveElementBefore (FormElementInterface $elementToMove, FormElementInterface $referenceElement)
 
 moveElementAfter (FormElementInterface $elementToMove, FormElementInterface $referenceElement)
 
 removeElement (FormElementInterface $elementToRemove)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Model\Renderable\AbstractCompositeRenderable
RenderableInterface[] getRenderablesRecursively ()
 
 registerInFormIfPossible ()
 
 onRemoveFromParentRenderable ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable
string getType ()
 
string getIdentifier ()
 
 setIdentifier (string $identifier)
 
 setOptions (array $options, bool $resetValidators=false)
 
mixed createValidator (string $validatorIdentifier, array $options=[])
 
 addValidator (ValidatorInterface $validator)
 
SplObjectStorage getValidators ()
 
 setDataType (string $dataType)
 
string getRendererClassName ()
 
array getRenderingOptions ()
 
mixed setRenderingOption (string $key, $value)
 
CompositeRenderableInterface null getParentRenderable ()
 
 setParentRenderable (CompositeRenderableInterface $parentRenderable)
 
FormDefinition getRootForm ()
 
int getIndex ()
 
 setIndex (int $index)
 
string getLabel ()
 
 setLabel (string $label)
 
string getTemplateName ()
 
bool isEnabled ()
 
RenderableVariantInterface[] getVariants ()
 
RenderableVariantInterface createVariant (array $options)
 
 addVariant (RenderableVariantInterface $variant)
 
 applyVariant (RenderableVariantInterface $variant)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface
 setRenderingOption (string $key, $value)
 
SplObjectStorage< ValidatorInterfacegetValidators ()
 
 addValidator (ValidatorInterface $validator)
 
 setDataType (string $dataType)
 

Protected Attributes

array $properties = array( )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Form\Domain\Model\Renderable\AbstractCompositeRenderable
TYPO3 CMS Form Domain Model Renderable RenderableInterface[] $renderables = array( )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable
string $type
 
string $identifier
 
CompositeRenderableInterface $parentRenderable
 
string $label = ''
 
array $renderingOptions = array( )
 
int $index = 0
 
string $templateName = ''
 
array $variants = array( )
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Model\Renderable\AbstractCompositeRenderable
 addRenderable (RenderableInterface $renderable)
 
 moveRenderableBefore (RenderableInterface $renderableToMove, RenderableInterface $referenceRenderable)
 
 moveRenderableAfter (RenderableInterface $renderableToMove, RenderableInterface $referenceRenderable)
 
 removeRenderable (RenderableInterface $renderableToRemove)
 

Detailed Description

A Section, being part of a bigger Page

This class contains multiple FormElements (FormElementInterface).

Please see FormDefinition for an in-depth explanation.

Scope: frontend This class is NOT meant to be sub classed by developers.

Definition at line 38 of file Section.php.

Member Function Documentation

◆ getDefaultValue()

mixed TYPO3\CMS\Form\Domain\Model\FormElements\Section::getDefaultValue ( )

Get the default value with which the Form Element should be initialized during display. Note: This is currently not used for section elements

Returns
‪mixed the default value for this Form Element

Implements TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface.

Definition at line 83 of file Section.php.

◆ getProperties()

array TYPO3\CMS\Form\Domain\Model\FormElements\Section::getProperties ( )

Get all element-specific configuration properties

Returns
‪array

Implements TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface.

Definition at line 104 of file Section.php.

References TYPO3\CMS\Form\Domain\Model\FormElements\Section\$properties.

◆ getUniqueIdentifier()

string TYPO3\CMS\Form\Domain\Model\FormElements\Section::getUniqueIdentifier ( )

Returns a unique identifier of this element. While element identifiers are only unique within one form, this includes the identifier of the form itself, making it "globally" unique

Returns
‪string the "globally" unique identifier of this element

Implements TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface.

Definition at line 70 of file Section.php.

References TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\getRootForm().

◆ initializeFormElement()

TYPO3\CMS\Form\Domain\Model\FormElements\Section::initializeFormElement ( )

Will be called as soon as the element is (tried to be) added to a form

See also
registerInFormIfPossible()

Implements TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface.

Definition at line 51 of file Section.php.

References $GLOBALS.

◆ isRequired()

bool TYPO3\CMS\Form\Domain\Model\FormElements\Section::isRequired ( )

Whether or not this element is required

Returns
‪bool

Implements TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface.

Definition at line 132 of file Section.php.

References $validator, and TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface\getValidators().

◆ setDefaultValue()

TYPO3\CMS\Form\Domain\Model\FormElements\Section::setDefaultValue (   $defaultValue)

Set the default value with which the Form Element should be initialized during display. Note: This is currently ignored for section elements

Parameters
mixed$defaultValue‪the default value for this Form Element

Implements TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface.

Definition at line 95 of file Section.php.

◆ setProperty()

TYPO3\CMS\Form\Domain\Model\FormElements\Section::setProperty ( string  $key,
  $value 
)

Set an element-specific configuration property.

Parameters
string$key
mixed$value

Implements TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface.

Definition at line 115 of file Section.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule(), and TYPO3\CMS\Core\Utility\ArrayUtility\removeNullValuesRecursive().

Member Data Documentation

◆ $properties

array TYPO3\CMS\Form\Domain\Model\FormElements\Section::$properties = array( )
protected