JsHelper Class Reference
Inheritance diagram for JsHelper:

Public Member Functions | |
| alert_ ($message) | |
| confirm_ ($message) | |
| escape ($string) | |
| if_ ($if, $then, $else=null, $elseif=array()) | |
| load_ ($url=null, $options=array()) | |
| object ($data=array(), $block=false, $prefix= '', $postfix= '', $stringKeys=array(), $quoteKeys=true, $q="\"") | |
| prompt_ ($message, $default= '') | |
| real ($var) | |
| redirect_ ($url=null) | |
| select ($pattern) | |
| tryThese_ ($expr1, $expr2, $expr3) | |
Public Attributes | |
| $action = null | |
| $base = null | |
| $data = null | |
| $effectMap | |
| $helpers = array() | |
| $here = null | |
| $hook = null | |
| $output = false | |
| $params = null | |
| $plugin = null | |
| $themeWeb = null | |
| $webroot = null | |
Detailed Description
Definition at line 39 of file js.php.
Member Function Documentation
| JsHelper::escape | ( | $ | string | ) |
| JsHelper::if_ | ( | $ | if, | |
| $ | then, | |||
| $ | else = null, |
|||
| $ | elseif = array() | |||
| ) |
| JsHelper::load_ | ( | $ | url = null, |
|
| $ | options = array() | |||
| ) |
Loads a remote URL
- Parameters:
-
string $url array $options
- Returns:
- string
Definition at line 125 of file js.php.
References $url, and Router::url().
| JsHelper::object | ( | $ | data = array(), |
|
| $ | block = false, |
|||
| $ | prefix = '', |
|||
| $ | postfix = '', |
|||
| $ | stringKeys = array(), |
|||
| $ | quoteKeys = true, |
|||
| $ | q = "\"" | |||
| ) |
Generates a JavaScript object in JavaScript Object Notation (JSON) from an array
- Parameters:
-
array $data Data to be converted boolean $block Wraps return value in a <script> block if true string $prefix Prepends the string to the returned data string $postfix Appends the string to the returned data array $stringKeys A list of array keys to be treated as a string boolean $quoteKeys If false, treats $stringKey as a list of keys *not* to be quoted string $q The type of quote to use
- Returns:
- string A JSON code block
Definition at line 223 of file js.php.
References $out.
| JsHelper::redirect_ | ( | $ | url = null |
) |
Member Data Documentation
| JsHelper::$effectMap |
The documentation for this class was generated from the following file:
- 1.2.x.x/cake/libs/view/helpers/js.php