You are here

public function StateViewsData::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_event/src/Entity/StateViewsData.php, line 21
Contains \Drupal\bat_event\Entity\StateViewsData.

Class

StateViewsData
Provides Views data for Event entities.

Namespace

Drupal\bat_event\Entity

Code

public function getViewsData() {
  $data = parent::getViewsData();
  $data['states']['table']['base'] = [
    'field' => 'id',
    'title' => $this
      ->t('State'),
    'help' => $this
      ->t('The State ID.'),
  ];
  return $data;
}