function spaces_views_data in Spaces 6
Same name and namespace in other branches
- 6.3 includes/spaces.views.inc \spaces_views_data()
- 6.2 includes/spaces.views.inc \spaces_views_data()
- 7.3 includes/spaces.views.inc \spaces_views_data()
- 7 includes/spaces.views.inc \spaces_views_data()
Implementation of hook_views_data(). Adds a meta-filter that provides a layer of abstraction that delegates actual filtering to the implementing space type modules.
File
- includes/
spaces.views.inc, line 62
Code
function spaces_views_data() {
$data = array();
// This defines a fake "pseudo" table.
$data['spaces']['table']['group'] = t('Spaces');
$data['spaces']['table']['join'] = array(
'node' => array(
'left_field' => 'nid',
'field' => 'sid',
),
);
$data['spaces']['current'] = array(
'title' => t('Node in current space'),
'help' => t('Posts in current space.'),
'filter' => array(
'handler' => 'spaces_handler_filter_spaces_current',
),
);
// Pseudo node table
$data['spaces_node']['table']['group'] = t('Spaces');
$data['spaces_node']['table']['join'] = array(
'node' => array(
'table' => 'node',
'left_field' => 'nid',
'field' => 'nid',
),
);
$data['spaces_node']['feature'] = array(
'title' => t('Spaces feature'),
'field' => array(
'field' => 'type',
'handler' => 'spaces_handler_field_spaces_feature',
),
);
return $data;
}