|
| | __construct () |
| |
| | loadContent () |
| |
| | setVariables ($variables) |
| |
| | addPlainText ($label, $text, $icon=null, $edit_link=null, $delete_link=null, $add_link=null) |
| |
| | addText ($label, $id) |
| |
| | addLink ($label, $url, $icon=false, $target=false, $attributes=array()) |
| |
| | insertLink ($label, $url, $icon=false, $target=false, $attributes=array()) |
| |
| | open ($state=true) |
| |
| | shouldRender ($state=true) |
| |
| | ignoreDatabaseContents ($state=true) |
| |
| | render () |
| |
| | addWidget (Widget $widget, $index=null) |
| |
| | insertWidget (Widget $widget, $before_index, $index=null) |
| |
| | getWidget ($index) |
| |
| | getWidgets () |
| |
| | removeWidget ($index) |
| |
| | hasWidgets () |
| |
| | hasWidget ($index) |
| |
| | render () |
| |
Help section
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m @license GPL 2 or later
- Since
- 3.1
◆ __construct()
◆ addLink()
| addLink |
( |
|
$label, |
|
|
|
$url, |
|
|
|
$icon = false, |
|
|
|
$target = false, |
|
|
|
$attributes = array() |
|
) |
| |
Adds a link to the helpbar
- Parameters
-
| String | $label | Label of the link |
| String | $url | The link itself |
| mixed | $icon | An optional, additional icon |
| mixed | $target | The target attribute of the link element |
| array | $attributes | Additional attribute for the link element |
◆ addPlainText()
| addPlainText |
( |
|
$label, |
|
|
|
$text, |
|
|
|
$icon = null, |
|
|
|
$edit_link = null, |
|
|
|
$delete_link = null, |
|
|
|
$add_link = null |
|
) |
| |
Adds text entries to the helpbar.
- Parameters
-
| String | $label | Label/category |
| String | $text | The text item itself |
| mixed | $icon | An optional, additional icon |
| mixed | $edit_link | Optional edit link if the user may do so |
| mixed | $delete_link | Optional delete link if the user may do so |
| mixed | $add_link | Optional add link if the user may do so |
◆ addText()
Adds an entry from the database to the helpbar.
- Parameters
-
| String | $label | Label for the entry |
| String | $id | Id of the entry |
◆ ignoreDatabaseContents()
| ignoreDatabaseContents |
( |
|
$state = true | ) |
|
Tells the helpbar to ignore any potentially stored contents from the database. This is neccessary for pages like the wiki where a helpbar entry is present in the database but since url parameters are currently ignored, the entry would apply for all pages of the wiki - which it shouldn't. This is just a makeshift solution until arbitrary routes can be handled.
- Parameters
-
| bool | $state | Indicating whether the contents should be ignored |
- Todo:
- remove this as soon as the helpbar can handle arbitrary routes
◆ insertLink()
| insertLink |
( |
|
$label, |
|
|
|
$url, |
|
|
|
$icon = false, |
|
|
|
$target = false, |
|
|
|
$attributes = array() |
|
) |
| |
Inserts a link to the helpbar before all other elements
- Parameters
-
| String | $label | Label of the link |
| String | $url | The link itself |
| mixed | $icon | An optional, additional icon |
| mixed | $target | The target attribute of the link element |
| array | $attributes | Additional attribute for the link element |
◆ interpolate()
| interpolate |
( |
|
$string, |
|
|
|
$variables = array() |
|
) |
| |
|
protected |
Interpolates a string with variables.
Essentially, the string "i am #{name}" with the variables ['name' => 'groot'] will be converted to "i am groot". I guess you get the principle.
- Parameters
-
| mixed | $string | String to interpolate (an array of string may be passed as well) |
| array | $variables | Variables to interpolate into the string(s) |
- Returns
- mixed Either an interpolated string or an array of such
◆ loadContent()
load help content from db
◆ open()
Tells the helpbar whether it should be open by default.
- Parameters
-
| bool | $state | Indicating whether the helpbar should be open |
◆ render()
Renders the help bar. The helpbar will only be rendered if it actually contains any widgets. It will use the template "helpbar.php" located at "templates/helpbar". A notification is dispatched before and after the actual rendering process.
- Returns
- String The HTML code of the rendered helpbar.
Reimplemented from WidgetContainer.
◆ setVariables()
| setVariables |
( |
|
$variables | ) |
|
set variables for help content
- Parameters
-
| Array | $variables | The variables to set |
◆ shouldRender()
| shouldRender |
( |
|
$state = true | ) |
|
Tells the helpbar whether it should render.
- Parameters
-
| bool | $state | Indicating whether the helpbar should render |
◆ $ignore_db
◆ $open
◆ $should_render
◆ $variables
The documentation for this class was generated from the following file: