Stud.IP  5.4
ContentBar Class Reference

Public Member Functions

 setInfo (string $info)
 
 setIcon (Icon $icon)
 
 setTOC (TOCItem $toc)
 
 setActionMenu (ActionMenu $actionMenu)
 
 render ()
 
 __toString ()
 

Static Public Member Functions

static get ()
 

Data Fields

 $infoText = ''
 
 $icon = ''
 
 $toc = null
 
 $actionMenu = null
 

Protected Member Functions

 __construct ()
 

Static Protected Attributes

static $instance = null
 

Detailed Description

Class ContentBar ContentBar for page, with optional ActionMenu, Table of contents and breadcrumbs.

Author
Thomas Hackl hackl.nosp@m.@dat.nosp@m.a-que.nosp@m.st.d.nosp@m.e GPL2 or any later version
Since
Stud.IP 5.0

Constructor & Destructor Documentation

◆ __construct()

__construct ( )
finalprotected

Private constructor to ensure that the singleton Get() method is always used. The constructor is finalized so that the call to get() will never fail.

See also
ContentBar::get

Member Function Documentation

◆ __toString()

__toString ( )

Magic method: when ContentBar is used as a string, this will just call the render method, returning a string representation of this object.

Returns
string

◆ get()

static get ( )
static

Returns the instance of this container to ensure there is only one instance.

Parameters
TOCItem$tocTable of contents object.
string$infoSome information to show, like creation date, author etc.
Icon | null$iconAn icon to show in content bar.
ActionMenu | null$actionMenuOptional action menu for page actions.
Returns
ContentBar

◆ render()

render ( )

Render the content bar from corresponding template

Returns
string

◆ setActionMenu()

setActionMenu ( ActionMenu  $actionMenu)

Provide an action menu.

Parameters
ActionMenu$actionMenu
Returns
ContentBar $this Return current instance for method chaining.

◆ setIcon()

setIcon ( Icon  $icon)

Set an icon.

Parameters
Icon$icon
Returns
ContentBar $this Return current instance for method chaining.

◆ setInfo()

setInfo ( string  $info)

Provide some info text.

Parameters
string$info
Returns
ContentBar $this Return current instance for method chaining.

◆ setTOC()

setTOC ( TOCItem  $toc)

Set a table of contents object.

Parameters
TOCItem$toc
Returns
ContentBar $this Return current instance for method chaining.

Field Documentation

◆ $actionMenu

$actionMenu = null

◆ $icon

$icon = ''

◆ $infoText

$infoText = ''

◆ $instance

$instance = null
staticprotected

The singleton instance of the container

◆ $toc

$toc = null

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