Stud.IP  4.2 Revision
Sidebar Class Reference
Inheritance diagram for Sidebar:
Inheritance graph
Collaboration diagram for Sidebar:
Collaboration graph

Public Member Functions

 __construct ()
 
 setImage ($image)
 
 getImage ()
 
 removeImage ()
 
 setTitle ($title=true)
 
 getTitle ()
 
 removeTitle ()
 
 setContextAvatar (Avatar $avatar)
 
 removeContextAvatar ()
 
 render ()
 
- Public Member Functions inherited from WidgetContainer
 addWidget (Widget $widget, $index=null)
 
 insertWidget (Widget $widget, $before_index, $index=null)
 
 getWidget ($index)
 
 getWidgets ()
 
 removeWidget ($index)
 
 hasWidgets ()
 
 hasWidget ($index)
 
 render ()
 

Protected Attributes

 $image = false
 
 $title = false
 
 $context_avatar = null
 
- Protected Attributes inherited from WidgetContainer
 $widgets = array()
 

Additional Inherited Members

- Static Public Member Functions inherited from WidgetContainer
static Get ()
 
- Protected Member Functions inherited from WidgetContainer
 __construct ()
 
- Static Protected Attributes inherited from WidgetContainer
static $instances = null
 

Detailed Description

The sidebar supersedes the pretty static infobox of Stud.IP.

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

Constructor, tries to automagically set the sidebar's title.

Here is the call graph for this function:

Member Function Documentation

◆ getImage()

getImage ( )

Returns the image for the sidebar.

Returns
mixed Either the previously set image or false if no image has been set.
Here is the caller graph for this function:

◆ getTitle()

getTitle ( )

Returns the title of the sidebar.

Returns
mixed Either the previously set title or false if no title has been set
Here is the caller graph for this function:

◆ removeContextAvatar()

removeContextAvatar ( )

Removes a previously set context-indicator.

◆ removeImage()

removeImage ( )

Removes a previously set image.

◆ removeTitle()

removeTitle ( )

Removes a previously set title.

◆ render()

render ( )

Renders the sidebar. The sidebar will only be rendered if it actually contains any widgets. It will use the template "sidebar.php" located at "templates/sidebar". A notification is dispatched before and after the actual rendering process.

Returns
String The HTML code of the rendered sidebar.
Here is the call graph for this function:

◆ setContextAvatar()

setContextAvatar ( Avatar  $avatar)

Sets an avatar as a context-indicator. For example in a course a course- avatar will indicate which course teh user is navigating in.

Parameters
Avatar$avatar: the avatar object of the context
Here is the caller graph for this function:

◆ setImage()

setImage (   $image)

Set an image for the sidebar.

Parameters
String$imageThe image relative to assets/images
Here is the caller graph for this function:

◆ setTitle()

setTitle (   $title = true)

Set a title of the sidebar.

Parameters
String$titleThe title of the sidebar.
Here is the caller graph for this function:

Field Documentation

◆ $context_avatar

$context_avatar = null
protected

◆ $image

$image = false
protected

Contains an optional image for the container.

◆ $title

$title = false
protected

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