UnknownFormElement extends AbstractRenderable implements FormElementInterface
A Form Element that has no definition.
Scope: frontend
Table of Contents
Interfaces
- FormElementInterface
- A base form element interface, which can be the starting point for creating custom (PHP-based) Form Elements.
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<string|int, mixed>
- 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.
- $variants : array<string|int, mixed>
- associative array of rendering variants
Methods
- __construct() : mixed
- Constructor. Needs this FormElement's identifier and the FormElement type
- 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() : mixed
- Create a validator for the element
- createVariant() : RenderableVariantInterface
- getDefaultValue() : mixed
- Get the default value with which the Form Element should be initialized during display.
- 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
- getProperties() : array<string|int, mixed>
- Get all element-specific configuration properties
- getRendererClassName() : string
- Get the classname of the renderer
- getRenderingOptions() : array<string|int, mixed>
- Get all rendering options
- getRootForm() : FormDefinition
- Get the root form this element belongs to
- getTemplateName() : string
- Get the template name of the renderable
- getType() : string
- Get the type of the renderable
- getUniqueIdentifier() : string
- Returns a unique identifier of this element.
- getValidators() : SplObjectStorage
- Get all validators on the element
- getVariants() : array<string|int, RenderableVariantInterface>
- Get all rendering variants
- initializeFormElement() : mixed
- Sets up the form element
- isEnabled() : bool
- Returns whether this renderable is enabled
- isRequired() : bool
- Whether or not this element is required
- 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
- setDefaultValue() : mixed
- Not used in this implementation
- 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
- setProperty() : mixed
- Not used in this implementation
- 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
= ''
$parentRenderable
The parent renderable
protected
CompositeRenderableInterface|null
$parentRenderable
$renderingOptions
associative array of rendering options
protected
array<string|int, mixed>
$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<string|int, mixed>
$variants
= []
Methods
__construct()
Constructor. Needs this FormElement's identifier and the FormElement type
public
__construct(string $identifier, string $type) : mixed
Parameters
- $identifier : string
-
The FormElement's identifier
- $type : string
-
The Form Element Type
Tags
addValidator()
Add a validator to the element
public
addValidator(ValidatorInterface $validator) : mixed
Parameters
- $validator : ValidatorInterface
addVariant()
Adds the specified variant to this form element
public
addVariant(RenderableVariantInterface $variant) : mixed
Parameters
- $variant : RenderableVariantInterface
applyVariant()
Apply the specified variant to this form element regardless of their conditions
public
applyVariant(RenderableVariantInterface $variant) : mixed
Parameters
- $variant : RenderableVariantInterface
createValidator()
Create a validator for the element
public
createValidator(string $validatorIdentifier[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $validatorIdentifier : string
- $options : array<string|int, mixed> = []
Tags
createVariant()
public
createVariant(array<string|int, mixed> $options) : RenderableVariantInterface
Parameters
- $options : array<string|int, mixed>
Return values
RenderableVariantInterfacegetDefaultValue()
Get the default value with which the Form Element should be initialized during display.
public
getDefaultValue() : mixed
Return values
mixed —the default value for this Form Element
getIdentifier()
Get the identifier of the element
public
getIdentifier() : string
Return values
stringgetIndex()
Get the index of the renderable
public
getIndex() : int
Return values
intgetLabel()
Get the label of the renderable
public
getLabel() : string
Return values
stringgetParentRenderable()
Get the parent renderable
public
getParentRenderable() : CompositeRenderableInterface|null
Return values
CompositeRenderableInterface|nullgetProperties()
Get all element-specific configuration properties
public
getProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>getRendererClassName()
Get the classname of the renderer
public
getRendererClassName() : string
Return values
stringgetRenderingOptions()
Get all rendering options
public
getRenderingOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getRootForm()
Get the root form this element belongs to
public
getRootForm() : FormDefinition
Tags
Return values
FormDefinitiongetTemplateName()
Get the template name of the renderable
public
getTemplateName() : string
Return values
stringgetType()
Get the type of the renderable
public
getType() : string
Return values
stringgetUniqueIdentifier()
Returns a unique identifier of this element.
public
getUniqueIdentifier() : string
While element identifiers are only unique within one form, this includes the identifier of the form itself, making it "globally" unique
Return values
string —the "globally" unique identifier of this element
getValidators()
Get all validators on the element
public
getValidators() : SplObjectStorage
Return values
SplObjectStoragegetVariants()
Get all rendering variants
public
getVariants() : array<string|int, RenderableVariantInterface>
Return values
array<string|int, RenderableVariantInterface>initializeFormElement()
Sets up the form element
public
initializeFormElement() : mixed
isEnabled()
Returns whether this renderable is enabled
public
isEnabled() : bool
Return values
boolisRequired()
Whether or not this element is required
public
isRequired() : bool
Return values
boolonRemoveFromParentRenderable()
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
setDefaultValue()
Not used in this implementation
public
setDefaultValue(mixed $defaultValue) : mixed
Parameters
- $defaultValue : mixed
-
the default value for this Form Element
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<string|int, mixed> $options[, bool $resetValidators = false ]) : mixed
Every property which has a corresponding set* method can be set using the passed $options array.
Parameters
- $options : array<string|int, mixed>
- $resetValidators : bool = false
setParentRenderable()
Set the parent renderable
public
setParentRenderable(CompositeRenderableInterface $parentRenderable) : mixed
Parameters
- $parentRenderable : CompositeRenderableInterface
setProperty()
Not used in this implementation
public
setProperty(string $key, mixed $value) : mixed
Parameters
- $key : string
- $value : mixed
setRenderingOption()
Set the rendering option $key to $value.
public
setRenderingOption(string $key, mixed $value) : mixed
Parameters
- $key : string
- $value : mixed