FormExtensionService
in package
Table of Contents
Properties
- $inputs : array<string, array<string|int, RawHtmlInput|BaseInput>>
Methods
- add() : void
- applySave() : bool
- Apply all save-functions for all inputs for this $position (including all tabs).
- getAll() : array<string|int, mixed>
- Used by widget to render all inputs for a certain position.
- init() : void
- getAllForPosition() : array<string|int, BaseInput|RawHtmlInput>
- Get all tabs for a position
- validatePosition() : bool
- Returns false if position is not yet supported by LS.
Properties
$inputs
private
array<string, array<string|int, RawHtmlInput|BaseInput>>
$inputs
= []
List of inputs, mapped by formname.tabname => input list
Methods
add()
public
add(string $position, RawHtmlInput|BaseInput $input) : void
Parameters
- $position : string
-
The form position, e.g. "globalsettings" or "globalsettings.email_settings"
- $input : RawHtmlInput|BaseInput
applySave()
Apply all save-functions for all inputs for this $position (including all tabs).
public
applySave(string $position, CHttpRequest $request) : bool
Returns true if all save was successful; else false Will add warning flash messages for each failed input save.
Parameters
- $position : string
- $request : CHttpRequest
Return values
boolgetAll()
Used by widget to render all inputs for a certain position.
public
getAll(string $position) : array<string|int, mixed>
Parameters
- $position : string
Return values
array<string|int, mixed>init()
public
init() : void
getAllForPosition()
Get all tabs for a position
private
getAllForPosition(string $position) : array<string|int, BaseInput|RawHtmlInput>
Parameters
- $position : string
Return values
array<string|int, BaseInput|RawHtmlInput>validatePosition()
Returns false if position is not yet supported by LS.
private
validatePosition(string $position) : bool
This works as a allowlist of supported forms.
Parameters
- $position : string