|
Stud.IP
6.1
|
Public Member Functions | |
| __construct (string $url, string $label, ?\Icon $icon=null) | |
| setURL (string $url) | |
| getURL () | |
| setLabel (string $label) | |
| getLabel () | |
| setIcon (?\Icon $icon=null) | |
| getIcon () | |
| setAttributes (array $attributes) | |
| addAttributes (array $attributes) | |
| setAttribute (string $key, $value) | |
| getAttributes () | |
| removeAttribute (string $key, bool $throw_exception=false) | |
| render () | |
Public Member Functions inherited from Part | |
| __construct (... $parts) | |
| setContextObject ($object) | |
| getContextObject () | |
| addPart (Part $part) | |
| addInput (Input $input) | |
| addText (string $text, bool $text_is_html=true) | |
| addLink (string $title, string $url, ?\Icon $icon=null, array $attributes=[]) | |
| render () | |
| renderWithCondition () | |
| getAllInputs () | |
| setParent (Part $parent) | |
| setIfCondition ($if) | |
| getInputFromArray (array $data) | |
Protected Attributes | |
| $url | |
| $label | |
| $icon | |
| $attributes = [] | |
Protected Attributes inherited from Part | |
| $parent = null | |
| $contextobject = null | |
| $parts = [] | |
Additional Inherited Members | |
Data Fields inherited from Part | |
| $if = null | |
The Link class represents a part of a form that displays a link.
| __construct | ( | string | $url, |
| string | $label, | ||
| ?\Icon | $icon = null |
||
| ) |
| addAttributes | ( | array | $attributes | ) |
Adds/appends attributes to the current attributes for the link.
| array | $attributes |
| getAttributes | ( | ) |
Returns the attributes for the link.
| getIcon | ( | ) |
Returns the icon for the link.
| getLabel | ( | ) |
Returns the label for the link.
| getURL | ( | ) |
Returns the url for the link.
| removeAttribute | ( | string | $key, |
| bool | $throw_exception = false |
||
| ) |
Removes an attribute.
| string | $key | |
| bool | $throw_exception | Throw an exception if the attribute does not exists (default: false) |
| render | ( | ) |
"Renders" the text: Either return it directly, if it is HTML or call htmlReady first before returning it.
| setAttribute | ( | string | $key, |
| $value | |||
| ) |
Sets a single attribute for the link.
| string | $key | |
| mixed | $value |
| setAttributes | ( | array | $attributes | ) |
Replaces all attributes for the link.
| array | $attributes |
| setIcon | ( | ?\Icon | $icon = null | ) |
Sets the icon for the link. May be null to remove the icon.
| \Icon | $icon |
| setLabel | ( | string | $label | ) |
Sets the label for the link.
| string | $label |
| setURL | ( | string | $url | ) |
Sets the url for the link.
| string | $url |
|
protected |
|
protected |
|
protected |
|
protected |