‪TYPO3CMS  ‪main
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 ()
 
 setOptions (array $options, bool $resetValidators=false)
 
string getUniqueIdentifier ()
 
mixed getDefaultValue ()
 
 setDefaultValue ($defaultValue)
 
 getProperties ()
 
 setProperty (string $key, $value)
 
 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
 getType ()
 
 getIdentifier ()
 
 setIdentifier (string $identifier)
 
 createValidator (string $validatorIdentifier, array $options=[])
 
 addValidator (ValidatorInterface $validator)
 
 getValidators ()
 
 setDataType (string $dataType)
 
 getRendererClassName ()
 
 getRenderingOptions ()
 
mixed setRenderingOption (string $key, $value)
 
CompositeRenderableInterface null getParentRenderable ()
 
 setParentRenderable (CompositeRenderableInterface $parentRenderable)
 
 getRootForm ()
 
 getIndex ()
 
 setIndex (int $index)
 
 getLabel ()
 
 setLabel (string $label)
 
 getTemplateName ()
 
 isEnabled ()
 
RenderableVariantInterface[] getVariants ()
 
 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 null $parentRenderable
 
string $label = ''
 
array $renderingOptions = array( )
 
int $index = 0
 
string $templateName = ''
 
array $variants = array( )
 
ValidatorResolver $validatorResolver = null
 

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 93 of file Section.php.

◆ getProperties()

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

Get all element-specific configuration properties

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

Definition at line 110 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 80 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 50 of file Section.php.

References $GLOBALS.

◆ isRequired()

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

◆ 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 105 of file Section.php.

◆ setOptions()

TYPO3\CMS\Form\Domain\Model\FormElements\Section::setOptions ( array  $options,
bool  $resetValidators = false 
)

Set multiple properties of this object at once. Every property which has a corresponding set* method can be set using the passed $options array.

Reimplemented from TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable.

Definition at line 62 of file Section.php.

References TYPO3\CMS\Form\Domain\Model\FormElements\Section\setProperty().

◆ setProperty()

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

Set an element-specific configuration property.

Parameters
mixed$value

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

Definition at line 120 of file Section.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\removeNullValuesRecursive().

Referenced by TYPO3\CMS\Form\Domain\Model\FormElements\Section\setOptions().

Member Data Documentation

◆ $properties

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