__construct |
( |
|
$name, |
|
|
|
$title, |
|
|
|
$value, |
|
|
array |
$attributes = [] |
|
) |
| |
|
final |
Constructor of the Input class.
- Parameters
-
$name | |
$title | |
$value | |
$attributes | |
static create |
( |
|
$name, |
|
|
|
$title, |
|
|
|
$value, |
|
|
array |
$attributes = [] |
|
) |
| |
|
static |
A static constructor. Returns a new Input-object.
- Parameters
-
string | $name | |
string | $title | |
mixed | $value | |
array | $attributes | |
- Returns
- static
extractOptionsFromAttributes |
( |
array & |
$attributes | ) |
|
|
protected |
Returns an array with all names of all inputs that this Input-object has. Normally this is just one name because there is only one input. But if you think of i18n-inputs there are possibly more textareas - one for each language. In that case this function would return all names of all inputs that are present.
- Returns
- string[]
Returns the context-object which is usually a SimpleORMap object.
- Returns
- null|
static getFielddataFromMeta |
( |
|
$meta, |
|
|
|
$object |
|
) |
| |
|
static |
This static method returns fielddata as an array from metadata of a database-field. This array will be used internally to create the best fitting Input object to the database field.
- Parameters
-
- Returns
- array
Returns the name of the given input. Also have a look at the method getAllInputNames if you want to provide multiple input elements (like in i18n input fields) within one virtual input. In that case this getName method returns the main-input name like the attribute in the SORM class.
- Returns
- null
Returns the parent of this Input if there is already one.
- Returns
- null|Part
Returns the values from the request. Normally this is ::get, but special Input-classes could also return arrays or objects.
- Returns
- string|null
Returns the value of this input.
- Returns
- null
This renders the Input.
- Returns
- string
Renders the Input but maybe encapsulated in a template that is displayed only if a condition is true. This is helpful for the if-attribute on the Input like in setIfCondition.
- Returns
- string
Sets a condition to display this input. The condition is a javascript condition which is used by vue to hide the input if the condition is not satisfies.
- Parameters
-
- Returns
- $this
setMapper |
( |
Callable |
$callback | ) |
|
Sets a special mapper-function to turn the request-values into the real values for the database.
- Parameters
-
- Returns
- $this
setParent |
( |
Part |
$parent | ) |
|
Sets the parent of this Input object. Usually this is done automatically by the framework in the moment that the input is initialized in the Form object. So you usually don't need to call this method on your own.
- Parameters
-
- Returns
- $this
setPermission |
( |
bool |
$permission | ) |
|
Set if the user is able to see and edit this input
- Parameters
-
- Returns
- $this
setRequired |
( |
|
$required = true | ) |
|
Marks the input as a required field.
- Parameters
-
- Returns
- $this
setStoringFunction |
( |
Callable |
$store | ) |
|
Sets the storing function. This would override the normal storing-function that just sets the value of a given context object like a SORM object.
- Parameters
-
- Returns
- $this
The documentation for this class was generated from the following file: