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

Forms service. More...

Public Member Functions

 __construct (ViewsService $views, EventsService $events)
 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

 $events
 
 $views
 
 $rendering
 
 $footer = ''
 

Detailed Description

Forms service.

Definition at line 14 of file FormsService.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
ViewsService$viewsViews service
EventsService$eventsEvents service

Definition at line 44 of file FormsService.php.

Member Function Documentation

Elgg\FormsService::getFooter ( )

Returns currently set footer.

Returns
string
Exceptions
LogicException

Definition at line 169 of file FormsService.php.

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

Definition at line 84 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 155 of file FormsService.php.

Member Data Documentation

Elgg\FormsService::$events
protected

Definition at line 21 of file FormsService.php.

Elgg\FormsService::$footer = ''
protected

Definition at line 36 of file FormsService.php.

Elgg\FormsService::$rendering
protected

Definition at line 31 of file FormsService.php.

Elgg\FormsService::$views
protected

Definition at line 26 of file FormsService.php.


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