◆ __construct()
Constructor of this Part. Can take one or more Part objects or Input objects or arrays representing an Input object.
- Parameters
-
◆ addInput()
◆ addLink()
addLink |
( |
string |
$title, |
|
|
string |
$url, |
|
|
?\Icon |
$icon = null , |
|
|
array |
$attributes = [] |
|
) |
| |
Adds a link as a form part.
- Parameters
-
string | $title | The title of the link. |
string | $url | The URL of the link. |
\Icon | null | $icon | The icon to be used for the link. |
array | $attributes | Additional link attributes. |
- Returns
- Link The Text form element containing the link as HTML.
◆ addPart()
Adds a Part object on the next layer.
- Parameters
-
- Returns
- $this
◆ addText()
addText |
( |
string |
$text, |
|
|
bool |
$text_is_html = true |
|
) |
| |
Adds a text block inside the form.
- Parameters
-
string | $text | The text to be added. |
bool | $text_is_html | Whether the text is HTML (true) or plain text (false). Defaults to true. |
- Returns
- Text The added text form part.
◆ getAllInputs()
Recursively returns all Input elements attached to this Part object or any child Parts.
- Returns
- Input[]
◆ getContextObject()
Returns the context object of this Part if there is any. If there is none it tries to return the context-object of a parent object.
- Returns
- void|null
◆ getInputFromArray()
getInputFromArray |
( |
array |
$data | ) |
|
Returns an Input element from an array.
- Parameters
-
- Returns
- array|mixed
- Exceptions
-
◆ render()
Renders this Part object. This could be a section or any other HTML element with child-elements.
- Returns
- string
◆ renderWithCondition()
Renders the Part element with a condition.
- Returns
- string
◆ setContextObject()
setContextObject |
( |
|
$object | ) |
|
Sets the context-object which is most likely a SimpleORMap object
- Parameters
-
- Returns
- $this
◆ setIfCondition()
Sets a condition to display this Part. The condition is a javascript condition which is used by vue to hide the input if the condition is not satisfies.
- Parameters
-
- Returns
- $this
◆ setParent()
setParent |
( |
Part |
$parent | ) |
|
Sets the parent object of this Part. Usually this is done automatically.
- Parameters
-
- Returns
- $this
- Exceptions
-
◆ $contextobject
◆ $if
◆ $parent
◆ $parts
The documentation for this class was generated from the following file: