\seekquarry\yioop\views\helpersHelpbuttonHelper

This is a helper class is used to draw help button for context sensitive help.

Helpers are classes used to reduce the coding required in Views. They do some computation with the data they are supplied and output HTML/XML

Summary

Methods
Properties
Constants
__construct()
render()
clean()
setupHelpParams()
$is_help_initialized
$localization_data
$back_params
$script
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$is_help_initialized

$is_help_initialized : boolean

Whether or not setupHelpParams() has been previously called

Type

boolean

$localization_data

$localization_data : array

jaavscript locatization strings

Type

array

$back_params

$back_params : string

Query parameters as json array for page just came from

Type

string

$script

$script : string

Javascript needed to open a help button page

Type

string

Methods

__construct()

__construct() 

The constructor at this point initializes the all the required code for Wiki Help initialization.

render()

render(  $help_point_id,   $csrf_token_value) : String

This method is used to render the help button, given a help point CSRF token and target controller name.

Parameters

$help_point_id

used to set as help button id

$csrf_token_value

CSRF token to make api call/open edit link

Returns

String —

button html.

clean()

clean(mixed  $value, mixed  $default = null) : string

Used to clean strings that might be tainted as originate from the user

Parameters

mixed $value

tainted data

mixed $default

if $value is not set default value is returned, this isn't used much since if the error_reporting is E_ALL or -1 you would still get a Notice.

Returns

string —

the clean input matching the type provided

setupHelpParams()

setupHelpParams() 

This Helper method is used to setup params needed for Context-Sensitive help to work. This gets executed if there is atleast one help button rendered on the page. This is executed only once with the help of "is_help_initialized" variable.