function rules_link_views_data in Rules Link 7.2
Same name and namespace in other branches
- 7 rules_link.views.inc \rules_link_views_data()
Implements hook_views_data().
File
- ./
rules_link.views.inc, line 11 - Provide views data.
Code
function rules_link_views_data() {
$data = array();
foreach (rules_link_get_links() as $name => $rules_link) {
$entity = entity_get_info($rules_link->entity_type);
$data[$entity['base table']][$name]['field']['moved to'] = array(
'views_entity_' . $rules_link->entity_type,
$name,
'field',
);
$data['views_entity_' . $rules_link->entity_type][$name]['field'] = array(
'title' => $rules_link->label,
'help' => t('Execute the selected rules link.'),
'handler' => 'views_handler_field_rules_link',
'rules link name' => $name,
);
}
return $data;
}