|
| 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=[]) |
|
| insertLink ($label, $url, $icon=false, $target=false, $attributes=[]) |
|
| 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) |
|
| countWidgets (string $widget_class=null) |
|
| hasWidgets () |
|
| hasWidget ($index) |
|
| render () |
|
addLink |
( |
|
$label, |
|
|
|
$url, |
|
|
|
$icon = false , |
|
|
|
$target = false , |
|
|
|
$attributes = [] |
|
) |
| |
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 |
( |
|
$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 |
Adds an entry from the database to the helpbar.
- Parameters
-
String | $label | Label for the entry |
String | $id | Id of the entry |
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 |
insertLink |
( |
|
$label, |
|
|
|
$url, |
|
|
|
$icon = false , |
|
|
|
$target = false , |
|
|
|
$attributes = [] |
|
) |
| |
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 |
( |
|
$string, |
|
|
|
$variables = [] |
|
) |
| |
|
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
load help content from db
Tells the helpbar whether it should be open by default.
- Parameters
-
bool | $state | Indicating whether the helpbar should be open |
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.
setVariables |
( |
|
$variables | ) |
|
set variables for help content
- Parameters
-
Array | $variables | The variables to set |
shouldRender |
( |
|
$state = true | ) |
|
Tells the helpbar whether it should render.
- Parameters
-
bool | $state | Indicating whether the helpbar should render |
The documentation for this class was generated from the following file: