The json_encode template operator
Registered in extension/ezjscore/autoloads/eztemplateautoload.php by the class ezjscEncodingTemplateFunctions (extension/ezjscore/autoloads/ezjscencodingtemplatefunctions.php).
The same class also registers: xml_encode, node_encode.
Parameters
| Parameter | Type | Required | Default |
|---|---|---|---|
hash | hash | yes | array() |
Example
Built from the parameter list above; the values are placeholders (the operator's template hints decide whether it takes an input).
$value|json_encode( hash() )In a shipped template
The first use in the templates of this installation, design/admin4/templates/children_detailed.tpl line 237:
data-create-groups="json_encode( $subitems_create_groups )|wash"Related
Generated by ./console exp:help:examples from extension/ezjscore/autoloads/eztemplateautoload.php, extension/ezjscore/autoloads/ezjscencodingtemplatefunctions.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.