Elgg  Version master
Public Member Functions | Protected Attributes | List of all members
Elgg\FormsService Class Reference

Forms service. More...

Public Member Functions

 __construct (protected ViewsService $views, protected EventsService $events, protected ESMService $esm)
 Constructor. More...
 
 render (string $action, array $form_vars=[], array $body_vars=[])
 
 setFooter (string $footer= '')
 Sets form footer and defers its rendering until the form view and extensions have been rendered. More...
 
 getFooter ()
 Returns currently set footer. More...
 

Protected Attributes

bool $rendering = false
 
string $footer = ''
 

Detailed Description

Forms service.

Definition at line 15 of file FormsService.php.

Constructor & Destructor Documentation

Elgg\FormsService::__construct ( protected ViewsService  $views,
protected EventsService  $events,
protected ESMService  $esm 
)

Constructor.

Parameters
ViewsService$viewsViews service
EventsService$eventsEvents service
ESMService$esmESM service

Definition at line 30 of file FormsService.php.

Member Function Documentation

Elgg\FormsService::getFooter ( )

Returns currently set footer.

Returns
string
Exceptions
LogicException

Definition at line 166 of file FormsService.php.

Elgg\FormsService::render ( string  $action,
array  $form_vars = [],
array  $body_vars = [] 
)

Definition at line 72 of file FormsService.php.

Elgg\FormsService::setFooter ( string  $footer = '')

Sets form footer and defers its rendering until the form view and extensions have been rendered.

Deferring footer rendering allows plugins to extend the form view while maintaining logical DOM structure. Footer will be rendered using 'elements/forms/footer' view after form body has finished rendering

Parameters
string$footerFooter
Returns
void
Exceptions
LogicException

Definition at line 152 of file FormsService.php.

Member Data Documentation

string Elgg\FormsService::$footer = ''
protected

Definition at line 21 of file FormsService.php.

bool Elgg\FormsService::$rendering = false
protected

Definition at line 19 of file FormsService.php.


The documentation for this class was generated from the following file: