‪TYPO3CMS  ‪main
TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface:
TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement TYPO3\CMS\Form\Domain\Model\FormElements\GridRowInterface TYPO3\CMS\Form\Domain\Model\FormElements\Section TYPO3\CMS\Form\Domain\Model\FormElements\UnknownFormElement TYPO3\CMS\Form\Domain\Model\FormElements\Date TYPO3\CMS\Form\Domain\Model\FormElements\DatePicker TYPO3\CMS\Form\Domain\Model\FormElements\FileUpload TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement TYPO3\CMS\Form\Tests\Unit\Domain\FormElements\Fixtures\TestingFormElement TYPO3\CMS\Form\Domain\Model\FormElements\GridRow TYPO3\CMS\Form\Domain\Model\FormElements\GridRow

Public Member Functions

 initializeFormElement ()
 
string getUniqueIdentifier ()
 
mixed getDefaultValue ()
 
 setDefaultValue ($defaultValue)
 
 setProperty (string $key, $value)
 
 getProperties ()
 
 setRenderingOption (string $key, $value)
 
SplObjectStorage< ValidatorInterfacegetValidators ()
 
 addValidator (ValidatorInterface $validator)
 
 setDataType (string $dataType)
 
 isRequired ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface
CompositeRenderableInterface null getParentRenderable ()
 
 setParentRenderable (CompositeRenderableInterface $renderable)
 
 setIndex (int $index)
 
 getIndex ()
 
 onRemoveFromParentRenderable ()
 
 registerInFormIfPossible ()
 
 getTemplateName ()
 
 isEnabled ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface
 getType ()
 
 getIdentifier ()
 
 getLabel ()
 
string getRendererClassName ()
 
array getRenderingOptions ()
 

Detailed Description

A base form element interface, which can be the starting point for creating custom (PHP-based) Form Elements.

A FormElement is a part of a Page, which in turn is part of a FormDefinition. See FormDefinition for an in-depth explanation.

Often, you should rather subclass AbstractFormElement instead of implementing this interface.

Scope: frontend

Definition at line 39 of file FormElementInterface.php.

Member Function Documentation

◆ addValidator()

TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface::addValidator ( ValidatorInterface  $validator)

Registers a validator for this element

◆ getDefaultValue()

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

Get the default value with which the Form Element should be initialized during display.

Returns
‪mixed the default value for this Form Element

Implemented in TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement, TYPO3\CMS\Form\Domain\Model\FormElements\Section, and TYPO3\CMS\Form\Domain\Model\FormElements\UnknownFormElement.

◆ getProperties()

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

◆ getUniqueIdentifier()

string TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface::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

Implemented in TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement, TYPO3\CMS\Form\Domain\Model\FormElements\Section, and TYPO3\CMS\Form\Domain\Model\FormElements\UnknownFormElement.

◆ getValidators()

SplObjectStorage<ValidatorInterface> TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface::getValidators ( )

Returns the child validators of the ConjunctionValidator that is registered for this element

Returns
‪\SplObjectStorage<ValidatorInterface>

Referenced by TYPO3\CMS\Form\Domain\Model\FormElements\Section\isRequired(), and TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement\isRequired().

◆ initializeFormElement()

◆ isRequired()

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

◆ setDataType()

TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface::setDataType ( string  $dataType)

◆ setDefaultValue()

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

Set the default value with which the Form Element should be initialized during display.

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

Implemented in TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement, TYPO3\CMS\Form\Domain\Model\FormElements\Section, and TYPO3\CMS\Form\Domain\Model\FormElements\UnknownFormElement.

◆ setProperty()

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

◆ setRenderingOption()

TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface::setRenderingOption ( string  $key,
  $value 
)

Set a rendering option

Parameters
mixed$value