Forms service.
More...
|
| | getFormView (string $entity_type, string $entity_subtype) |
| | Get the form view for edit/add of an entity type/subtype. More...
|
| |
| | getFormAction (string $entity_type, string $entity_subtype) |
| | Get the form action for edit/add of an entity type/subtype. More...
|
| |
Forms service.
Definition at line 18 of file FormsService.php.
◆ __construct()
◆ getFooter()
| Elgg\FormsService::getFooter |
( |
| ) |
|
Returns currently set footer.
- Returns
- string
- Exceptions
-
Definition at line 267 of file FormsService.php.
◆ getFormAction()
| Elgg\FormsService::getFormAction |
( |
string |
$entity_type, |
|
|
string |
$entity_subtype |
|
) |
| |
|
protected |
Get the form action for edit/add of an entity type/subtype.
- Parameters
-
| string | $entity_type | entity type |
| string | $entity_subtype | entity subtype |
- Returns
- string
- Exceptions
-
- Since
- 7.1
Definition at line 228 of file FormsService.php.
◆ getFormView()
| Elgg\FormsService::getFormView |
( |
string |
$entity_type, |
|
|
string |
$entity_subtype |
|
) |
| |
|
protected |
Get the form view for edit/add of an entity type/subtype.
- Parameters
-
| string | $entity_type | entity type |
| string | $entity_subtype | entity subtype |
- Returns
- string
- Since
- 7.1
Definition at line 203 of file FormsService.php.
◆ render()
| Elgg\FormsService::render |
( |
string |
$action, |
|
|
array |
$form_vars = [], |
|
|
array |
$body_vars = [] |
|
) |
| |
◆ renderEntity()
| Elgg\FormsService::renderEntity |
( |
string |
$entity_type, |
|
|
string |
$entity_subtype, |
|
|
?\ElggEntity |
$entity = null, |
|
|
array |
$vars = [] |
|
) |
| |
Render an entity edit/add form.
- Parameters
-
| string | $entity_type | entity type |
| string | $entity_subtype | entity subtype |
| \ElggEntity | null | $entity | entity |
| array | $vars | Additional vars:
- (string) action: which form action to use
- (array) body_vars: additional body vars
- (array) form_vars: additional form vars
- (string) view: which form view to use
|
- Returns
- string
- Exceptions
-
- Since
- 7.1
Definition at line 162 of file FormsService.php.
◆ setFooter()
| 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
-
- Returns
- void
- Exceptions
-
Definition at line 253 of file FormsService.php.
◆ $footer
| string Elgg\FormsService::$footer = '' |
|
protected |
◆ $rendering
| bool Elgg\FormsService::$rendering = false |
|
protected |
The documentation for this class was generated from the following file: