public function UnitTypeViewsData::getViewsData in Booking and Availability Management Tools for Drupal 8
Returns views data for the entity type.
Return value
array Views data in the format of hook_views_data().
Overrides EntityViewsData::getViewsData
File
- modules/
bat_unit/ src/ Entity/ UnitTypeViewsData.php, line 21 - Contains \Drupal\bat_unit\Entity\UnitType.
Class
- UnitTypeViewsData
- Provides Views data for Unit type entities.
Namespace
Drupal\bat_unit\EntityCode
public function getViewsData() {
$data = parent::getViewsData();
$data['unit_type']['table']['base'] = [
'field' => 'id',
'title' => $this
->t('Unit type'),
'help' => $this
->t('The Unit type ID.'),
];
$data['unit_type']['calendars'] = [
'field' => [
'title' => t('Event Management'),
'help' => t('Display links to manage all calendars for this Type.'),
'id' => 'bat_type_handler_type_calendars_field',
],
];
return $data;
}