TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
AbstractCompositeRenderable Class Reference
Inheritance diagram for AbstractCompositeRenderable:
AbstractRenderable CompositeRenderableInterface RenderableInterface RenderableInterface RootRenderableInterface RootRenderableInterface FormDefinition AbstractSection Page Section

Public Member Functions

 getRenderablesRecursively ()
 
 registerInFormIfPossible ()
 
 onRemoveFromParentRenderable ()
 
- Public Member Functions inherited from AbstractRenderable
 getType ()
 
 getIdentifier ()
 
 setOptions (array $options)
 
 createValidator (string $validatorIdentifier, array $options=[])
 
 addValidator (ValidatorInterface $validator)
 
 getValidators ()
 
 setDataType (string $dataType)
 
 setRendererClassName (string $rendererClassName)
 
 getRendererClassName ()
 
 getRenderingOptions ()
 
 setRenderingOption (string $key, $value)
 
 getParentRenderable ()
 
 setParentRenderable (CompositeRenderableInterface $parentRenderable)
 
 getRootForm ()
 
 registerInFormIfPossible ()
 
 onRemoveFromParentRenderable ()
 
 getIndex ()
 
 setIndex (int $index)
 
 getLabel ()
 
 setLabel (string $label)
 
 beforeRendering (FormRuntime $formRuntime)
 
 onBuildingFinished ()
 

Protected Member Functions

 addRenderable (RenderableInterface $renderable)
 
 moveRenderableBefore (RenderableInterface $renderableToMove, RenderableInterface $referenceRenderable)
 
 moveRenderableAfter (RenderableInterface $renderableToMove, RenderableInterface $referenceRenderable)
 
 removeRenderable (RenderableInterface $renderableToRemove)
 

Protected Attributes

 $renderables = []
 
- Protected Attributes inherited from AbstractRenderable
 $type
 
 $identifier
 
 $parentRenderable
 
 $label = ''
 
 $renderingOptions = []
 
 $rendererClassName = null
 
 $index = 0
 

Detailed Description

Convenience base class which implements common functionality for most classes which implement CompositeRenderableInterface, i.e. have child renderable elements.

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

Definition at line 27 of file AbstractCompositeRenderable.php.

Member Function Documentation

addRenderable ( RenderableInterface  $renderable)
protected

Add a renderable to the list of child renderables.

This function will be wrapped by the subclasses, f.e. with an "addPage" or "addElement" method with the correct type hint.

Parameters
RenderableInterface$renderable
Returns
void
Exceptions
FormDefinitionConsistencyException

Definition at line 48 of file AbstractCompositeRenderable.php.

References RootRenderableInterface\getIdentifier(), RenderableInterface\getParentRenderable(), RenderableInterface\setIndex(), and RenderableInterface\setParentRenderable().

Referenced by AbstractSection\addElement(), and FormDefinition\addPage().

getRenderablesRecursively ( )

Returns all RenderableInterface instances of this composite renderable recursively

Returns
RenderableInterface[]

Implements CompositeRenderableInterface.

Definition at line 139 of file AbstractCompositeRenderable.php.

References AbstractCompositeRenderable\$renderables.

Referenced by AbstractSection\getElementsRecursively(), and AbstractFormFactory\triggerFormBuildingFinished().

moveRenderableAfter ( RenderableInterface  $renderableToMove,
RenderableInterface  $referenceRenderable 
)
protected

Move $renderableToMove after $referenceRenderable

This function will be wrapped by the subclasses, f.e. with an "movePageAfter" or "moveElementAfter" method with the correct type hint.

Parameters
RenderableInterface$renderableToMove
RenderableInterface$referenceRenderable
Returns
void
Exceptions
FormDefinitionConsistencyException

Definition at line 107 of file AbstractCompositeRenderable.php.

References RenderableInterface\getParentRenderable(), and RenderableInterface\setIndex().

Referenced by AbstractSection\moveElementAfter(), and FormDefinition\movePageAfter().

moveRenderableBefore ( RenderableInterface  $renderableToMove,
RenderableInterface  $referenceRenderable 
)
protected

Move $renderableToMove before $referenceRenderable

This function will be wrapped by the subclasses, f.e. with an "movePageBefore" or "moveElementBefore" method with the correct type hint.

Parameters
RenderableInterface$renderableToMove
RenderableInterface$referenceRenderable
Returns
void
Exceptions
FormDefinitionConsistencyException

Definition at line 70 of file AbstractCompositeRenderable.php.

References RenderableInterface\getParentRenderable(), and RenderableInterface\setIndex().

Referenced by AbstractSection\moveElementBefore(), and FormDefinition\movePageBefore().

onRemoveFromParentRenderable ( )

This function is called after a renderable has been removed from its parent renderable. This just passes the event down to all child renderables of this composite renderable.

Returns
void

Implements RenderableInterface.

Definition at line 203 of file AbstractCompositeRenderable.php.

registerInFormIfPossible ( )

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

Returns
void

Implements RenderableInterface.

Definition at line 187 of file AbstractCompositeRenderable.php.

removeRenderable ( RenderableInterface  $renderableToRemove)
protected

Remove a renderable from this renderable.

This function will be wrapped by the subclasses, f.e. with an "removePage" or "removeElement" method with the correct type hint.

Parameters
RenderableInterface$renderableToRemove
Returns
void
Exceptions
FormDefinitionConsistencyException

Definition at line 162 of file AbstractCompositeRenderable.php.

References RenderableInterface\getParentRenderable(), and RenderableInterface\onRemoveFromParentRenderable().

Referenced by AbstractSection\removeElement(), and FormDefinition\removePage().

Member Data Documentation