FormElementController
extends CollectionController
in package
This controller describes the behavior of Form element entities.
Use the controller to generate a collection of FormElement entities. Make sure to use the method getMeta to fetch translation data for all FormElement entities.
Tags
Table of Contents
- __construct() : mixed
- formatId() : string
- Format the id from 'form-element-something-123' to 'formElementSomething123'
- getMeta() : array<string|int, mixed>
- Get dynamic (meta) translations for the Form, like translated choices for dropdowns and placehold data for input elements. This is required to generate a fully translated form.
- getTranslation() : string
- Get translation data
Methods
__construct()
public
__construct() :
mixed
Tags
Return values
mixed —formatId()
Format the id from 'form-element-something-123' to 'formElementSomething123'
public
formatId(mixed $HtmlId) :
string
Parameters
- $HtmlId : mixed
Tags
Return values
string —getMeta()
Get dynamic (meta) translations for the Form, like translated choices for dropdowns and placehold data for input elements. This is required to generate a fully translated form.
public
getMeta(mixed $Id[, mixed $LanguageIso = null ]) :
array<string|int, mixed>
Parameters
- $Id : mixed
- $LanguageIso : mixed = null
Tags
Return values
array<string|int, mixed> —getTranslation()
Get translation data
public
getTranslation(mixed $Id, mixed $Title[, mixed $LanguageIso = null ][, mixed $Module = 'form-element' ]) :
string
Parameters
- $Id : mixed
- $Title : mixed
- $LanguageIso : mixed = null
- $Module : mixed = 'form-element'