FluidFormRenderer extends AbstractElementRenderer

A fluid RendererInterface implementation used to render a *FormDefinition*.

This renderer is called from .

Options

The FluidFormRenderer uses some rendering options which are of particular importance, as they determine how the form field is resolved to a path in the file system.

All rendering options are retrieved from the FormDefinition, using the method.

templateRootPaths

Used to define several paths for templates, which will be tried in reversed order (the paths are searched from bottom to top). The first folder where the desired layout is found, is used. If the array keys are numeric, they are first sorted and then tried in reversed order. Within this paths, fluid will search for a file which is named like the renderable type. For example: templateRootPaths.10 = EXT:form/Resources/Private/Frontend/Templates/ $renderable->getType() = Form Expected template file: EXT:form/Resources/Private/Frontend/Templates/Form.html There is a setting available to set a custom template name. Please read the section 'templateName'.

Only the root renderable (FormDefinition) has to be a template file. All child renderables are partials. By default, the root renderable is called 'Form'.

layoutRootPaths

Used to define several paths for layouts, which will be tried in reversed order (the paths are searched from bottom to top). The first folder where the desired layout is found, is used. If the array keys are numeric, they are first sorted and then tried in reversed order.

partialRootPaths

Used to define several paths for partials, which will be tried in reversed order. The first folder where the desired partial is found, is used. The keys of the array define the order.

Within this paths, fluid will search for a file which is named like the renderable type. For example: templateRootPaths.10 = EXT:form/Resources/Private/Frontend/Partials/ $renderable->getType() = Text Expected template file: EXT:form/Resources/Private/Frontend/Partials/Text.html There is a setting available to set a custom partial name. Please read the section 'templateName'.

templateName

By default, the renderable type will be taken as the name for the template / partial. For example: partialRootPaths.10 = EXT:form/Resources/Private/Frontend/Partials/ $renderable->getType() = Text Expected partial file: EXT:form/Resources/Private/Frontend/Partials/Text.html

Set 'templateName' to define a custom name which should be used instead. For example: templateName = Foo $renderable->getType() = Text Expected partial file: EXT:form/Resources/Private/Frontend/Partials/Foo.html

Rendering Child Renderables

If a renderable wants to render child renderables, inside its template / partial, it can do that using the formvh:renderRenderable ViewHelper.

A template example from Page shall demonstrate this:

  
      
          
              
          
      
  

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

Internal

Table of Contents

Properties

$formRuntime  : FormRuntime

Methods

getFormRuntime()  : FormRuntime
render()  : string
Renders the FormDefinition.
setFormRuntime()  : mixed

Properties

Methods

render()

Renders the FormDefinition.

public render() : string

This method is expected to call the 'beforeRendering' hook on each renderable. This method call the 'beforeRendering' hook initially. Each other hooks will be called from the renderRenderable viewHelper.

Internal
Return values
string

the rendered $formRuntime


        
On this page

Search results