You are here

function farm_group_views_data_alter in farmOS 2.x

Same name and namespace in other branches
  1. 7 modules/farm/farm_group/farm_group.views.inc \farm_group_views_data_alter()

Implements hook_views_data_alter().

File

modules/asset/group/farm_group.views.inc, line 11
Provides Views data for farm_group.module.

Code

function farm_group_views_data_alter(array &$data) {

  // Add the computed group membership field to assets.
  $data['asset']['group'] = [
    'title' => t('Current group'),
    'field' => [
      'id' => 'asset_group',
      'field_name' => 'group',
    ],
    'argument' => [
      'id' => 'asset_group',
    ],
  ];
}