◆ __construct()
Finalized constructor.
- Parameters
-
◆ addButton()
Adds a Studip-Button object to the footer of the dialog.
- Parameters
-
- Returns
- Form
◆ addPart()
Adds a Part object to this form like a fieldset
- Parameters
-
- Returns
- Form|void
◆ addSORM()
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()
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
◆ autoStore()
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
-
◆ create()
A static constructor for an empty Form object.
- Returns
- Form
◆ fromSORM()
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
◆ getButtons()
Returns the additional buttons (except the save-button) as an array of objects
- Returns
- array
◆ getCancelButtonName()
◆ getCancelButtonText()
- Returns
- string The text for the "save" button in the form.
◆ getDataSecure()
◆ getDebugMode()
◆ getId()
Returns the ID if this form. This ID is only relevant for plugins to identify this Form object.
- Returns
- string|null
◆ getLastPart()
Returns the last part of the form. If there is none yet, it will create a fieldset and return that.
- Returns
- Part
◆ getParts()
Returns all the Part objects like Fieldsets as an array.
- Returns
- Part[]
◆ getSaveButtonName()
◆ getSaveButtonText()
- Returns
- string The text for the "save" button in the form.
◆ getStorableValueFromRequest()
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()
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
◆ getSuccessMessage()
◆ getURL()
Returns the URL where the Form is leading to after the submit.
- Returns
- string|null
◆ isAutoStoring()
◆ isCollapsable()
◆ render()
Renders the whole form as a string.
- Returns
- string
- Exceptions
-
◆ setCancelButtonName()
setCancelButtonName |
( |
string |
$name | ) |
|
◆ setCancelButtonText()
setCancelButtonText |
( |
string |
$text | ) |
|
◆ setCollapsable()
setCollapsable |
( |
|
$collapsing = true | ) |
|
◆ setDataSecure()
setDataSecure |
( |
|
$data_secure | ) |
|
Sets if the form should be secured against accidental leaving of the page. Standard is on.
- Parameters
-
- Returns
- $this
◆ setDebugMode()
setDebugMode |
( |
bool |
$debug = true | ) |
|
◆ setId()
Sets the ID if this form. This ID is only relevant for plugins to identify this Form object.
- Parameters
-
- Returns
- Form $this
◆ setSaveButtonName()
setSaveButtonName |
( |
string |
$name | ) |
|
◆ setSaveButtonText()
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()
setSuccessMessage |
( |
string |
$success_message | ) |
|
◆ setURL()
Sets the URL where the Form should be leading after submitting.
- Parameters
-
- Returns
- Form $this
◆ store()
Returns the number of storing processes
- Returns
- : a number of storing processes. 0 if nothing was stored.
◆ validate()
◆ $autoStore
◆ $buttons
◆ $cancel_button_name
◆ $cancel_button_text
◆ $collapsable
◆ $data_secure
◆ $debugmode
◆ $id
◆ $inputs
◆ $parts
◆ $save_button_name
$save_button_name = 'STUDIPFORM_STORE_BUTTON' |
|
protected |
◆ $save_button_text
◆ $store_callbacks
◆ $success_message
◆ $url
The documentation for this class was generated from the following file: