Finalized constructor.
- Parameters
-
Adds a Part object to this form like a fieldset
- Parameters
-
- Returns
- Form|void
Adds a new Fieldset to the Form object with the SORM object's fields as input fields. These fields can be modified or specified by the $params array.
- Parameters
-
\SimpleORMap | $object | |
array | $params | |
- Returns
- Form $this
addStoreCallback |
( |
Callable |
$c | ) |
|
Adds a callback function that is executed right after the store-method. That callback receives this Form object as the only parameter.
- Parameters
-
- Returns
- Form $this
Stores the Form object if this is a POST-request. This also erases the URL so that the auto-save URL will be set automatically to the current $_SERVER['REQUEST_URI'].
- Returns
- $this
- Exceptions
-
A static constructor for an empty Form object.
- Returns
- Form
static fromSORM |
( |
\SimpleORMap |
$object, |
|
|
|
$params = [] , |
|
|
|
$url = null |
|
) |
| |
|
static |
Creates a new Form object from a SORM object so that each field of the db-table becomes an input-field of the form. You can modify the form by the params.
- Parameters
-
\SimpleORMap | $object | |
array | $params | |
string | null | $url | |
- Returns
- Form
Returns the ID if this form. This ID is only relevant for plugins to identify this Form object.
- Returns
- string|null
Returns the last part of the form. If there is none yet, it will create a fieldset and return that.
- Returns
- Part
Returns all the Part objects like Fieldsets as an array.
- Returns
- array
- Returns
- string The text for the "save" button in the form.
getStorableValueFromRequest |
( |
Input |
$input | ) |
|
|
protected |
Returns the value for the Input object from the $_REQUEST. This value will also be mapped by the Input's dataMapper function and after that by a special mapper-callback the Input probably has.
- Parameters
-
- Returns
- mixed
getStoringCallback |
( |
Input |
$input | ) |
|
|
protected |
Returns the function to be used to store the value into the input. If the given Input has no storing function it will generate a Closuer to set the value to the SimpleORMap context object.
- Parameters
-
- Returns
- |void
Returns the URL where the Form is leading to after the submit.
- Returns
- string|null
Renders the whole form as a string.
- Returns
- string
- Exceptions
-
\Flexi_TemplateNotFoundException | |
setCollapsable |
( |
|
$collapsing = true | ) |
|
Sets the ID if this form. This ID is only relevant for plugins to identify this Form object.
- Parameters
-
- Returns
- Form $this
setSaveButtonName |
( |
string |
$name | ) |
|
setSaveButtonText |
( |
string |
$text | ) |
|
Sets the text for the "save" button in the form.
- Parameters
-
string | $text | The text for the button to save the form. |
- Returns
- $this
setSuccessMessage |
( |
string |
$success_message | ) |
|
Sets the URL where the Form should be leading after submitting.
- Parameters
-
- Returns
- Form $this
Returns the number of storing processes
- Returns
- : a number of storing processes. 0 if nothing was stored.
The documentation for this class was generated from the following file: