|
static | fetch ($base_name, array $def, $objects, eZHTTPTool $http, $is_array, $indexField=false) |
| Fetches the HTTP post variables using the base name $base_name and stores them in the object $objects, if $is_array is true then $objects is assumed to be an array and all objects are updated. More...
|
|
static | fetchElement ($base_name, array $def, $object, eZHTTPTool $http, $index) |
| Helper function for eZHTTPPersistence::fetch(). More...
|
|
static | handleChecked ($base_name, array $def, $objects, eZHTTPTool $http, $is_array=true) |
| This function has some serious flaws and will be removed in a future release Goes trough all fields defined in $def and tries to find a post variable which is named $base_name, field name and "checked" with _ between items. More...
|
|
static | handleCheckedElement ($base_name, array $def, $object, eZHTTPTool $http) |
| Helper function for handleChecked(). More...
|
|
static | splitSelected ($base_name, $objects, eZHTTPTool $http, $cond, &$keepers, &$rejects) |
| Loops over the HTTP post variables with $base_name as the base. More...
|
|
Object persistence using HTTP post variables.
This class allows objects or data to exist between page views. It can read HTTP post variables and set them in existing objects to override data. This is useful if you want to keep changes in a page but don't want to store the changes in a DB. It also makes it easier to fetch the changes by the user before an object is stored.
static eZHTTPPersistence::handleChecked |
( |
|
$base_name, |
|
|
array |
$def, |
|
|
|
$objects, |
|
|
eZHTTPTool |
$http, |
|
|
|
$is_array = true |
|
) |
| |
|
static |
This function has some serious flaws and will be removed in a future release Goes trough all fields defined in $def and tries to find a post variable which is named $base_name, field name and "checked" with _ between items.
If the post variable is an array the id of the current object is matched against that array, if one is found the matched field is set to be true otherwise false. If no post variable was found with that signature the field is ignored. Example of name: In the HTML code use:
<input type="checkbox" name="ContentClassAttribute_is_searchable_checked[]" value="some_id">
- Deprecated:
- Parameters
-
string | $base_name | |
array | $def | |
| object|object[] | $objects |
eZHTTPTool | $http | |
bool | $is_array | |