FormFlexAjaxController extends AbstractFormEngineAjaxController
Handle FormEngine flex field ajax calls
Attributes
- #[AsController]
Table of Contents
Methods
- __construct() : mixed
- containerAdd() : ResponseInterface
- Render a single flex form section container to add it to the DOM
- addJavaScriptModulesToJavaScriptItems() : void
- getLabelsFromLocalizationFile() : array<string|int, mixed>
- Parse a language file and get a label/value array from it.
- getLanguageService() : LanguageService|null
- getRelativePathToStylesheetFile() : string
- Resolve a CSS file position, possibly prefixed with 'EXT:'
Methods
__construct()
public
__construct(FormDataCompiler $formDataCompiler, FlexFormTools $flexFormTools, NodeFactory $nodeFactory) : mixed
Parameters
- $formDataCompiler : FormDataCompiler
- $flexFormTools : FlexFormTools
- $nodeFactory : NodeFactory
containerAdd()
Render a single flex form section container to add it to the DOM
public
containerAdd(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceaddJavaScriptModulesToJavaScriptItems()
protected
addJavaScriptModulesToJavaScriptItems(array<string|int, mixed> $modules, JavaScriptItems $items) : void
Parameters
- $modules : array<string|int, mixed>
- $items : JavaScriptItems
getLabelsFromLocalizationFile()
Parse a language file and get a label/value array from it.
protected
getLabelsFromLocalizationFile(string $file) : array<string|int, mixed>
Parameters
- $file : string
-
EXT:path/to/file
Return values
array<string|int, mixed> —Label/value array
getLanguageService()
protected
getLanguageService() : LanguageService|null
Return values
LanguageService|nullgetRelativePathToStylesheetFile()
Resolve a CSS file position, possibly prefixed with 'EXT:'
protected
getRelativePathToStylesheetFile(string $stylesheetFile) : string
Parameters
- $stylesheetFile : string
-
Given file, possibly prefixed with EXT:
Return values
string —Web root relative position to file