This class represents the a more flexible menu used to group actions.
- Author
- Timo Hartge hartg.nosp@m.e@da.nosp@m.ta-qu.nosp@m.est..nosp@m.de GPL2 or any later version
- Since
- Stud.IP 4.0
◆ addAttribute()
addAttribute |
( |
|
$key, |
|
|
|
$value, |
|
|
|
$append = false |
|
) |
| |
Adds an attribute to the root element in html.
- Parameters
-
string | $key | Name of the attribute |
string | $value | Value of the attribute |
boolean | $append | Whether a current value should be append or not. |
◆ addButton()
addButton |
( |
|
$name, |
|
|
|
$label, |
|
|
Icon |
$icon = null , |
|
|
array |
$attributes = [] |
|
) |
| |
Adds a button to the list of actions.
- Parameters
-
String | $name | Button name |
String | $label | Textual representation of the name |
mixed | $icon | Optional icon (as Icon object) |
array | $attributes | Optional attributes to add to the tag |
- Returns
- ContentGroupMenu instance to allow chaining
◆ addCSSClass()
Adds a css classs to the root element in html.
- Parameters
-
string | $class | Name of the css class |
◆ addLink()
addLink |
( |
|
$link, |
|
|
|
$label, |
|
|
Icon |
$icon = null , |
|
|
array |
$attributes = [] |
|
) |
| |
Adds a link to the list of actions.
- Parameters
-
String | $link | Link target |
String | $label | Textual representation of the link |
mixed | $icon | Optional icon (as Icon object) |
array | $attributes | Optional attributes to add to the tag |
- Returns
- ContentGroupMenu instance to allow chaining
◆ addMultiPersonSearch()
◆ checkCondition()
Checks the condition. Takes global and local (conditionAll() & condition()) conditions into account.
- Returns
- bool indicating whether the condition is met or not
◆ condition()
Set condition for the next added item. If condition is false, the item will not be added.
- Parameters
-
bool | $state | State of the condition |
- Returns
- ContentGroupMenu instance to allow chaining
◆ conditionAll()
Set condition for all the next added items. If condition is false, no items will be added.
- Parameters
-
bool | $state | State of the condition |
- Returns
- ContentGroupMenu instance to allow chaining
◆ countLinks()
Return the number of menu actions.
- Returns
- integer count actions
◆ get()
◆ render()
Renders the action menu. If no item was added, an empty string will be returned. If a single item was added, the item itself will be displayed. Otherwise the whole menu will be rendered.
- Returns
- String containing the html representation of the action menu
◆ setAriaLabel()
Sets the label of the menu.
- Parameters
-
String | $label | label for the menu |
◆ setIcon()
setIcon |
( |
|
$menu_image, |
|
|
array |
$image_link_attributes = [] |
|
) |
| |
Sets the icon of the menu.
- Parameters
-
String | $menu_image | image html for the menu |
array | $image_link_attributes | Additional HTML attributes for the link that surrounds the image. |
◆ setLabel()
Sets the label of the menu.
- Parameters
-
String | $label | label for the menu |
◆ THRESHOLD
The documentation for this class was generated from the following file: