AbstractRenderable

abstract class \TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable

Implements
RenderableInterface, VariableRenderableInterface

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.

Table of Contents

Interfaces

RenderableInterface
Base interface which all Form Parts except the FormDefinition must adhere to (i.e. all elements which are NOT the root of a Form).
VariableRenderableInterface
Scope: frontend **This class is NOT meant to be sub classed by developers.**

Properties

$identifier  : string
The identifier of this renderable
$index  : int
The position of this renderable inside the parent renderable.
$label  : string
The label of this renderable
$parentRenderable  : CompositeRenderableInterface|null
The parent renderable
$renderingOptions  : array
associative array of rendering options
$templateName  : string
The name of the template file of the renderable.
$type  : string
Abstract "type" of this Renderable. Is used during the rendering process to determine the template file or the View PHP class being used to render the particular element.
$validatorResolver  : ValidatorResolver|null
$variants  : array
associative array of rendering variants

Methods

addValidator()  : mixed
Add a validator to the element.
addVariant()  : mixed
Adds the specified variant to this form element
applyVariant()  : mixed
Apply the specified variant to this form element regardless of their conditions
createValidator()  : ValidatorInterface|null
Create a validator for the element.
createVariant()  : RenderableVariantInterface
getIdentifier()  : string
Get the identifier of the element
getIndex()  : int
Get the index of the renderable
getLabel()  : string
Get the label of the renderable
getParentRenderable()  : CompositeRenderableInterface|null
Get the parent renderable
getRendererClassName()  : string
Get the classname of the renderer
getRenderingOptions()  : array
Get all rendering options
getRootForm()  : FormDefinition
Get the root form this element belongs to
getTemplateName()  : string
Get the templateName name of the renderable
getType()  : string
Get the type of the renderable
getValidators()  : SplObjectStorage
Get all validators on the element
getVariants()  : RenderableVariantInterface[]
Get all rendering variants
isEnabled()  : bool
Returns whether this renderable is enabled
onRemoveFromParentRenderable()  : mixed
Triggered when the renderable is removed from it's parent
registerInFormIfPossible()  : mixed
Register this element at the parent form, if there is a connection to the parent form.
setDataType()  : mixed
Set the datatype
setIdentifier()  : mixed
Set the identifier of the element
setIndex()  : mixed
Set the index of the renderable
setLabel()  : mixed
Set the label which shall be displayed next to the form element
setOptions()  : mixed
Set multiple properties of this object at once.
setParentRenderable()  : mixed
Set the parent renderable
setRenderingOption()  : mixed
Set the rendering option $key to $value.

Properties

$identifier

The identifier of this renderable

protected string $identifier

$index

The position of this renderable inside the parent renderable.

protected int $index = 0

$label

The label of this renderable

protected string $label = ''

$renderingOptions

associative array of rendering options

protected array $renderingOptions = []

$templateName

The name of the template file of the renderable.

protected string $templateName = ''

$type

Abstract "type" of this Renderable. Is used during the rendering process to determine the template file or the View PHP class being used to render the particular element.

protected string $type

$variants

associative array of rendering variants

protected array $variants = []

Methods

getIdentifier()

Get the identifier of the element

public getIdentifier() : string

Return values

string

getIndex()

Get the index of the renderable

public getIndex() : int

Return values

int

getLabel()

Get the label of the renderable

public getLabel() : string

Return values

string

getRendererClassName()

Get the classname of the renderer

public getRendererClassName() : string

Return values

string —

the renderer class name

getRenderingOptions()

Get all rendering options

public getRenderingOptions() : array

Return values

array —

associative array of rendering options

getTemplateName()

Get the templateName name of the renderable

public getTemplateName() : string

Return values

string

getType()

Get the type of the renderable

public getType() : string

Return values

string

getValidators()

Get all validators on the element

public getValidators() : SplObjectStorage

Return values

SplObjectStorage

isEnabled()

Returns whether this renderable is enabled

public isEnabled() : bool

Return values

bool

onRemoveFromParentRenderable()

Triggered when the renderable is removed from it's parent

public onRemoveFromParentRenderable() : mixed

registerInFormIfPossible()

Register this element at the parent form, if there is a connection to the parent form.

public registerInFormIfPossible() : mixed

setDataType()

Set the datatype

public setDataType(string $dataType) : mixed

Parameters

$dataType : string

setIdentifier()

Set the identifier of the element

public setIdentifier(string $identifier) : mixed

Parameters

$identifier : string

setIndex()

Set the index of the renderable

public setIndex(int $index) : mixed

Parameters

$index : int

setLabel()

Set the label which shall be displayed next to the form element

public setLabel(string $label) : mixed

Parameters

$label : string

setOptions()

Set multiple properties of this object at once.

public setOptions(array $options[, bool $resetValidators = false ]) : mixed

Every property which has a corresponding set* method can be set using the passed $options array.

Parameters

$options : array
$resetValidators : bool = false

setRenderingOption()

Set the rendering option $key to $value.

public setRenderingOption(string $key, mixed $value) : mixed

Parameters

$key : string
$value : mixed
On this page