function views_json_views_json_formats in Views Datasource 7
Implements hook_views_json_formats().
hook implementation should simply return an array, module_invoke_all() will merge them into one array. To support additional output formats, do the following: 1. Implement this hook. 2. Implement template_preprocess_views_views_json_style_XXXX (see example in theme/views_views_json_style.theme.inc) in your module, make sure it is loaded! 3. Create a views-views-json-style-XXXX.tpl.php file in views_datasource/theme by copying views-views-json-style-simple.tpl.php. Unfortunately this cannot be in your module it appears.
File
- views/
views_json.views.inc, line 65 - Views style plugin to render nodes in the JSON data format.
Code
function views_json_views_json_formats() {
$formats = array(
'simple' => t('Simple'),
'simple_object' => t('Single Simple Object with key value properties'),
'exhibit' => t('MIT Simile/Exhibit'),
'jqgrid' => t('To be consumed by jqGrid'),
'autocomplete' => t('Drupal autocomplete'),
);
return $formats;
}