codeBlock($script, $options = array('allowCache'=>true,'safe'=>true,'inline'=>true), $safe)
array $options - Set of options:
allowCache: boolean, designates whether this block is cacheable using the current cache settings.
safe: boolean, whether this block should be wrapped in CDATA tags. Defaults to helper’s object configuration.
inline: whether the block should be printed inline, or written to cached for later output (i.e. $scripts_for_layout).
boolean $safe - DEPRECATED. Use $options[‘safe’] instead
codeBlock returns a formatted script element containing $script. But can
$scripts_for_layout if you set $options[‘inline’] to false.
link($url, $inline = true)
boolean $inline If true, the <script> tag will be printed inline,
otherwise it will be printed in
output inline or in
string $script - String that needs to get escaped.
The characters that are escaped are:
“\r\n” => ‘\n’
“\r” => ‘\n’
“\n” => ‘\n’
‘”’ => ‘\”’
“’” => “\\’”
event($object, $event, $observer, $useCapture)
string $object - DOM Object to be observed.
string $event - type of event to observe ie ‘click’, ‘over’.
array $options - Set options: useCapture, allowCache, safe
boolean $options[‘useCapture’] - Whether to fire the event in the capture or bubble phase of event handling. Defaults false
boolean $options[‘safe’] - Indicates whether <script /> blocks should be written ‘safely,’ i.e. wrapped in CDATA blocks
boolean $file - If true, code will be written to a file
string $script - File name of script to include.
Includes the named $script. If $script is left blank the helper will include every script in your app/webroot/js directory. Includes the contents of each file inline. To create a script tag with an src attribute use link().
array $data - Data to be converted
array $options - Set of options: block, prefix, postfix, stringKeys, quoteKeys, q
boolean $options[‘block’] - Wraps return value in a <script /> block if true. Defaults to false.
string $options[‘prefix’] - Prepends the string to the returned data.
string $options[‘postfix’] - Appends the string to the returned data.
array $options[‘stringKeys’] - A list of array keys to be treated as a string.
boolean $options[‘quoteKeys’] - If false, treats $stringKey as a list of keys *not* to be quoted. Defaults to true.
string $options[‘q’] - The type of quote to use.