PHP Класс Elgg\Forms\StickyForms

С версии: 1.10.0
Показать файл Открыть проект

Открытые методы

Метод Описание
clearStickyForm ( string $form_name ) : void Remove form submission data from the session
clearStickyValue ( string $form_name, string $variable ) : void Remove one value of form submission data from the session
getStickyValue ( string $form_name, string $variable = '', mixed $default = null, boolean $filter_result = true ) : mixed Get a specific value from cached form submission data
getStickyValues ( string $form_name, boolean $filter_result = true ) : array Get all submission data cached for a form
isStickyForm ( string $form_name ) : boolean Does form submission data exist for this form?
makeStickyForm ( string $form_name ) : void Save form submission data (all GET and POST vars) into a session cache

Описание методов

clearStickyForm() публичный Метод

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.
public clearStickyForm ( string $form_name ) : void
$form_name string Form namespace
Результат void

clearStickyValue() публичный Метод

Remove one value of form submission data from the session
public clearStickyValue ( string $form_name, string $variable ) : void
$form_name string The name of the form
$variable string The name of the variable to clear
Результат void

getStickyValue() публичный Метод

Get a specific value from cached form submission data
public getStickyValue ( string $form_name, string $variable = '', mixed $default = null, boolean $filter_result = true ) : mixed
$form_name string The name of the form
$variable string The name of the variable
$default mixed Default value if the variable does not exist in sticky cache
$filter_result boolean Filter for bad input if true
Результат mixed

getStickyValues() публичный Метод

Get all submission data cached for a form
public getStickyValues ( string $form_name, boolean $filter_result = true ) : array
$form_name string The name of the form
$filter_result boolean Filter for bad input if true
Результат array

isStickyForm() публичный Метод

Does form submission data exist for this form?
public isStickyForm ( string $form_name ) : boolean
$form_name string Form namespace
Результат boolean

makeStickyForm() публичный Метод

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
public makeStickyForm ( string $form_name ) : void
$form_name string Name of the sticky form
Результат void