Stud.IP  5.4
SidebarWidget Class Reference
Inheritance diagram for SidebarWidget:
Widget ClipboardWidget DateSelectWidget ListWidget ResourceTreeWidget RoomSearchWidget SearchWidget SelectWidget TemplateWidget

Public Member Functions

 __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)
 

Protected Attributes

 $additional_attributes = []
 
- Protected Attributes inherited from Widget
 $elements = []
 
 $template = 'widgets/widget'
 
 $template_variables = []
 
 $layout = 'widgets/widget-layout'
 
 $forced_rendering = false
 
 $layout_css_classes = []
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
 guessIndex (WidgetElement $element)
 

Detailed Description

A widget for the sidebar.

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
See also
Sidebar

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Member Function Documentation

◆ getExtra()

getExtra ( )

◆ getId()

getId ( )

Returns the ID of this widget, if it is set.

Returns
string The ID of the widget or an empty string, if it is not set.

◆ getTitle()

getTitle ( )

Returns the title of the widget

Returns
string The title of the widget of false if no title has been set

◆ removeAdditionalAttribute()

removeAdditionalAttribute ( string  $key)

◆ removeExtra()

removeExtra ( )

◆ removeTitle()

removeTitle ( )

Removes the title of the widget.

◆ render()

render (   $variables = [])

Renders the widget. The widget will only be rendered if it contains at least one element.

Returns
string The THML code of the rendered sidebar widget

◆ setAdditionalAttribute()

setAdditionalAttribute ( string  $key,
  $value 
)

◆ setAdditionalAttributes()

setAdditionalAttributes ( array  $attributes)

◆ setExtra()

setExtra (   $extra)

◆ setId()

setId ( string  $id)

Sets the ID of the HTML element that represents the widget.

Parameters
string$idThe element-ID to be used for the widget.

◆ setTitle()

setTitle (   $title)

Sets the title of the widget.

Parameters
string$titleThe title of the widget

Field Documentation

◆ $additional_attributes

$additional_attributes = []
protected

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