‪TYPO3CMS  ‪main
TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable Class Reference
Inheritance diagram for TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable:
TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\VariableRenderableInterface TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement TYPO3\CMS\Form\Domain\Model\FormElements\UnknownFormElement TYPO3\CMS\Form\Domain\Model\Renderable\AbstractCompositeRenderable TYPO3\CMS\Form\Tests\Unit\Domain\Renderable\Fixtures\TestingRenderable 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\FormDefinition TYPO3\CMS\Form\Domain\Model\FormElements\AbstractSection TYPO3\CMS\Form\Domain\Model\FormElements\Page TYPO3\CMS\Form\Domain\Model\FormElements\Section TYPO3\CMS\Form\Tests\Unit\Domain\FormElements\Fixtures\TestingSection TYPO3\CMS\Form\Domain\Model\FormElements\GridRow

Public Member Functions

 getType ()
 
 getIdentifier ()
 
 setIdentifier (string $identifier)
 
 setOptions (array $options, bool $resetValidators=false)
 
 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 ()
 
 registerInFormIfPossible ()
 
 onRemoveFromParentRenderable ()
 
 getIndex ()
 
 setIndex (int $index)
 
 getLabel ()
 
 setLabel (string $label)
 
 getTemplateName ()
 
 isEnabled ()
 
RenderableVariantInterface[] getVariants ()
 
 createVariant (array $options)
 
 addVariant (RenderableVariantInterface $variant)
 
 applyVariant (RenderableVariantInterface $variant)
 

Protected Attributes

string $type
 
string $identifier
 
CompositeRenderableInterface null $parentRenderable
 
string $label = ''
 
array $renderingOptions = array( )
 
int $index = 0
 
string $templateName = ''
 
array $variants = array( )
 
ValidatorResolver $validatorResolver = null
 

Detailed Description

Convenience base class which implements common functionality for most classes which implement RenderableInterface.

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

Definition at line 41 of file AbstractRenderable.php.

Member Function Documentation

◆ addValidator()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::addValidator ( ValidatorInterface  $validator)

◆ addVariant()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::addVariant ( RenderableVariantInterface  $variant)

◆ applyVariant()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::applyVariant ( RenderableVariantInterface  $variant)

Apply the specified variant to this form element regardless of their conditions

Definition at line 424 of file AbstractRenderable.php.

References TYPO3\CMS\Form\Domain\Model\Renderable\RenderableVariantInterface\apply().

◆ createValidator()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::createValidator ( string  $validatorIdentifier,
array  $options = [] 
)

◆ createVariant()

◆ getIdentifier()

◆ getIndex()

◆ getLabel()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getLabel ( )

◆ getParentRenderable()

CompositeRenderableInterface null TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getParentRenderable ( )

Get the parent renderable

Returns
‪CompositeRenderableInterface|null

Implements TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface.

Definition at line 267 of file AbstractRenderable.php.

References TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\$parentRenderable.

◆ getRendererClassName()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getRendererClassName ( )

◆ getRenderingOptions()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getRenderingOptions ( )

◆ getRootForm()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getRootForm ( )

Get the root form this element belongs to

Exceptions
FormDefinitionConsistencyException

Reimplemented in TYPO3\CMS\Form\Tests\Unit\Domain\FormElements\Fixtures\TestingSection.

Definition at line 286 of file AbstractRenderable.php.

References TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\$parentRenderable, and TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface\getParentRenderable().

Referenced by TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\addValidator(), TYPO3\CMS\Form\Domain\Model\FormElements\AbstractSection\createElement(), TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\createValidator(), TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement\getDefaultValue(), TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\getRendererClassName(), TYPO3\CMS\Form\Domain\Model\FormElements\UnknownFormElement\getUniqueIdentifier(), TYPO3\CMS\Form\Domain\Model\FormElements\Section\getUniqueIdentifier(), TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement\getUniqueIdentifier(), TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\getValidators(), TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\onRemoveFromParentRenderable(), TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\registerInFormIfPossible(), TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\setDataType(), TYPO3\CMS\Form\Domain\Model\FormElements\AbstractFormElement\setDefaultValue(), and TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\setOptions().

◆ getTemplateName()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getTemplateName ( )

Get the templateName name of the renderable

Implements TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface.

Reimplemented in TYPO3\CMS\Form\Domain\Model\FormElements\UnknownFormElement.

Definition at line 376 of file AbstractRenderable.php.

◆ getType()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getType ( )

◆ getValidators()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getValidators ( )

◆ getVariants()

RenderableVariantInterface [] TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::getVariants ( )

◆ isEnabled()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::isEnabled ( )

Returns whether this renderable is enabled

Implements TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface.

Definition at line 386 of file AbstractRenderable.php.

◆ onRemoveFromParentRenderable()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::onRemoveFromParentRenderable ( )

◆ registerInFormIfPossible()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::registerInFormIfPossible ( )

◆ setDataType()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::setDataType ( string  $dataType)

◆ setIdentifier()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::setIdentifier ( string  $identifier)

◆ setIndex()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::setIndex ( int  $index)

◆ setLabel()

TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::setLabel ( string  $label)

◆ setOptions()

◆ setParentRenderable()

◆ setRenderingOption()

mixed TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::setRenderingOption ( string  $key,
  $value 
)

Set the rendering option $key to $value.

Parameters
mixed$value
Returns
‪mixed

Definition at line 250 of file AbstractRenderable.php.

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

Referenced by TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\setOptions(), and TYPO3\CMS\Form\Domain\Model\FormDefinition\setOptions().

Member Data Documentation

◆ $identifier

◆ $index

int TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::$index = 0
protected

◆ $label

string TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::$label = ''
protected

◆ $parentRenderable

◆ $renderingOptions

array TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::$renderingOptions = array( )
protected

◆ $templateName

string TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::$templateName = ''
protected

The name of the template file of the renderable.

Definition at line 85 of file AbstractRenderable.php.

◆ $type

string TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::$type
protected

◆ $validatorResolver

ValidatorResolver TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::$validatorResolver = null
protected

Definition at line 93 of file AbstractRenderable.php.

◆ $variants

array TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable::$variants = array( )
protected

associative array of rendering variants

Definition at line 91 of file AbstractRenderable.php.

Referenced by TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\getVariants().