Elgg  Version 1.11
Public Member Functions | List of all members
Elgg\Forms\StickyForms Class Reference

Public Member Functions

 makeStickyForm ($form_name)
 Load all the GET and POST variables into the sticky form cache. More...
 
 clearStickyForm ($form_name)
 Clear the sticky form cache. More...
 
 isStickyForm ($form_name)
 Has this form been made sticky? More...
 
 getStickyValue ($form_name, $variable= '', $default=null, $filter_result=true)
 Get a specific sticky variable. More...
 
 getStickyValues ($form_name, $filter_result=true)
 Get all the values in a sticky form in an array. More...
 
 clearStickyValue ($form_name, $variable)
 Clear a specific sticky variable. More...
 

Detailed Description

Definition at line 13 of file StickyForms.php.

Member Function Documentation

Elgg\Forms\StickyForms::clearStickyForm (   $form_name)

Clear the sticky form cache.

Call this if validation is successful in the action handler or when they sticky values have been used to repopulate the form after a validation error.

Parameters
string$form_nameForm namespace
Returns
void

Definition at line 51 of file StickyForms.php.

Elgg\Forms\StickyForms::clearStickyValue (   $form_name,
  $variable 
)

Clear a specific sticky variable.

Parameters
string$form_nameThe name of the form
string$variableThe name of the variable to clear
Returns
void

Definition at line 130 of file StickyForms.php.

Elgg\Forms\StickyForms::getStickyValue (   $form_name,
  $variable = '',
  $default = null,
  $filter_result = true 
)

Get a specific sticky variable.

Parameters
string$form_nameThe name of the form
string$variableThe name of the variable
mixed$defaultDefault value if the variable does not exist in sticky cache
boolean$filter_resultFilter for bad input if true
Returns
mixed

Definition at line 83 of file StickyForms.php.

Elgg\Forms\StickyForms::getStickyValues (   $form_name,
  $filter_result = true 
)

Get all the values in a sticky form in an array.

Parameters
string$form_nameThe name of the form
bool$filter_resultFilter for bad input if true
Returns
array

Definition at line 105 of file StickyForms.php.

Elgg\Forms\StickyForms::isStickyForm (   $form_name)

Has this form been made sticky?

Parameters
string$form_nameForm namespace
Returns
boolean

Definition at line 65 of file StickyForms.php.

Elgg\Forms\StickyForms::makeStickyForm (   $form_name)

Load all the GET and POST variables into the sticky form cache.

Call this from an action when you want all your submitted variables available if the submission fails validation and is sent back to the form

Parameters
string$form_nameName of the sticky form
Returns
void

Definition at line 25 of file StickyForms.php.


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