\seekquarry\yioop\views\helpersToggleHelper

This is a helper class is used to draw an On-Off switch in a web page

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()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() 

The constructor at this point does nothing

render()

render(boolean  $state, string  $on_url, string  $off_url, boolean  $caution = false) 

Draws an On Off switch in HTML where to toggle state one clicks a link

Parameters

boolean $state

whether the switch is on or off

string $on_url

url that is sent when one clicks on

string $off_url

url that is sent when one clicks off

boolean $caution

is set to true if on in the database but the status received from testing the state of the toggle some other way is off (causes things to draw in yellow rather than green)