PopupModalController
extends ControllerBase
in package
Handles dynamic generation of popup modals or tabs for forms.
This controller interprets URL query parameters to dynamically generate and display one or more forms in a modal or tabbed interface. It supports displaying a single form directly or multiple forms within a tabbed layout, based on the provided 'ids' and 'forms' query parameters.
Table of Contents
Methods
- build() : array<string|int, mixed>
- Builds and returns a render array for displaying forms in a modal or tabbed layout.
Methods
build()
Builds and returns a render array for displaying forms in a modal or tabbed layout.
public
build() : array<string|int, mixed>
This method reads 'ids' and 'forms' from the URL query parameters, decodes them from JSON, and uses this information to build the corresponding forms. For a single form, it directly returns the form render array. For multiple forms, it constructs a tabbed interface with each tab containing one form.
Return values
array<string|int, mixed> —A render array representing either a single form or a tabbed interface containing multiple forms, depending on the URL query parameters.