Stud.IP  5.4
LinksWidget Class Reference
Inheritance diagram for LinksWidget:
ListWidget SidebarWidget Widget ActionsWidget ExportWidget LinkCloudWidget NavigationWidget ShareWidget ViewsWidget

Public Member Functions

 __construct ()
 
addLink ($label, $url, $icon=null, $attributes=[], $index=null)
 
 addLinkFromHTML ($html, Icon $icon=null)
 
- Public Member Functions inherited from ListWidget
 __construct ()
 
 addCSSClass ($css_class)
 
 removeCSSClass ($css_class)
 
 addSeparator ($attributes=[])
 
 render ($variables=[])
 
- Public Member Functions inherited from SidebarWidget
 __construct ()
 
 setId (string $id)
 
 getId ()
 
 setTitle ($title)
 
 getTitle ()
 
 removeTitle ()
 
 setExtra ($extra)
 
 getExtra ()
 
 removeExtra ()
 
 setAdditionalAttribute (string $key, $value)
 
 setAdditionalAttributes (array $attributes)
 
 removeAdditionalAttribute (string $key)
 
 render ($variables=[])
 
- Public Member Functions inherited from Widget
 addElement (WidgetElement $element, $index=null)
 
 insertElement (WidgetElement $element, $before_index, $index=null)
 
 getElement ($index)
 
 getElements ()
 
 removeElement ($index)
 
 hasElements ()
 
 hasElement ($index)
 
 forceRendering ($state=true)
 
 addLayoutCSSClass ($css_class)
 
 removeLayoutCSSClass ($css_class)
 
 render ($variables=[])
 
 __isset ($offset)
 
 __get ($offset)
 
 __set ($offset, $value)
 
 __unset ($offset)
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
 guessIndex (WidgetElement $element)
 
- Protected Attributes inherited from ListWidget
 $css_classes = []
 
- Protected Attributes inherited from SidebarWidget
 $additional_attributes = []
 
- Protected Attributes inherited from Widget
 $elements = []
 
 $template = 'widgets/widget'
 
 $template_variables = []
 
 $layout = 'widgets/widget-layout'
 
 $forced_rendering = false
 
 $layout_css_classes = []
 

Detailed Description

A special sidebar widget for link list.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL 2 or later
Since
3.1

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructs the widget by defining a special template.

Member Function Documentation

◆ addLink()

& addLink (   $label,
  $url,
  $icon = null,
  $attributes = [],
  $index = null 
)

Adds a link to the widget

Parameters
String$labelLabel/content of the link
String$urlURL/Location of the link
Icon$iconinstance of class Icon for the link
bool$activePass true if the link is currently active, defaults to false

◆ addLinkFromHTML()

addLinkFromHTML (   $html,
Icon  $icon = null 
)

The documentation for this class was generated from the following file: