Stud.IP
5.4
|
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 () | |
![]() | |
__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 = [] | |
![]() | |
$parent = null | |
$contextobject = null | |
$parts = [] | |
Additional Inherited Members | |
![]() | |
$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 | ( | ) |
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 |