|
Moodle
2.2.1
http://www.collinsharper.com
|
Static Public Member Functions | |
| static | function_call ($function, array $arguments=null, $delay=0) |
| static | function_call_with_Y ($function, array $extraarguments=null) |
| static | object_init ($var, $class, array $arguments=null, array $requirements=null, $delay=0) |
| static | set_variable ($name, $value, $usevar=true) |
| static | event_handler ($selector, $event, $function, array $arguments=null) |
Simple javascript output class
Definition at line 1582 of file outputcomponents.php.
| static event_handler | ( | $ | selector, |
| $ | event, | ||
| $ | function, | ||
| array $ | arguments = null |
||
| ) | [static] |
Writes event handler attaching code
| mixed | $selector | standard YUI selector for elements, may be array or string, element id is in the form "#idvalue" |
| string | $event | A valid DOM event (click, mousedown, change etc.) |
| string | $function | The name of the function to call |
| array | $arguments | An optional array of argument parameters to pass to the function |
Definition at line 1688 of file outputcomponents.php.
| static function_call | ( | $ | function, |
| array $ | arguments = null, |
||
| $ | delay = 0 |
||
| ) | [static] |
Returns javascript code calling the function
| string | $function | function name, can be complex like Y.Event.purgeElement |
| array | $arguments | parameters |
| int | $delay | execution delay in seconds |
Definition at line 1590 of file outputcomponents.php.

| static function_call_with_Y | ( | $ | function, |
| array $ | extraarguments = null |
||
| ) | [static] |
Special function which adds Y as first argument of fucntion call.
| string | $function | |
| array | $extraarguments |
Definition at line 1612 of file outputcomponents.php.

| static object_init | ( | $ | var, |
| $ | class, | ||
| array $ | arguments = null, |
||
| array $ | requirements = null, |
||
| $ | delay = 0 |
||
| ) | [static] |
Returns JavaScript code to initialise a new object
| string | null | $var | If it is null then no var is assigned the new object |
| string | $class | |
| array | $arguments | |
| array | $requirements | |
| int | $delay |
Definition at line 1631 of file outputcomponents.php.
| static set_variable | ( | $ | name, |
| $ | value, | ||
| $ | usevar = true |
||
| ) | [static] |
Returns code setting value to variable
| string | $name | |
| mixed | $value | json serialised value |
| bool | $usevar | add var definition, ignored for nested properties |
Definition at line 1664 of file outputcomponents.php.
