function farm_group_farm_ui_entity_views in farmOS 7
Implements hook_farm_ui_entity_views().
File
- modules/
farm/ farm_group/ farm_group.module, line 57
Code
function farm_group_farm_ui_entity_views($entity_type, $bundle, $entity) {
$views = array();
// Add Views to assets.
if ($entity_type == 'farm_asset') {
// Add group membership log View at the bottom of assets.
$views[] = array(
'name' => 'farm_group_log',
'group' => 'logs_special',
'weight' => 100,
);
// If the asset is a group, add View of group members.
if ($bundle == 'group') {
$views[] = array(
'name' => 'farm_group_members',
'display' => 'page',
'title' => t('Group members'),
'group' => 'assets',
'weight' => -100,
'always' => TRUE,
);
}
}
return $views;
}