You are here

public function RegistrantViewsData::getViewsData in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Views/RegistrantViewsData.php \Drupal\rng\Views\RegistrantViewsData::getViewsData()
  2. 3.x src/Views/RegistrantViewsData.php \Drupal\rng\Views\RegistrantViewsData::getViewsData()

Returns views data for the entity type.

Return value

array Views data in the format of hook_views_data().

Overrides EntityViewsData::getViewsData

File

src/Views/RegistrantViewsData.php, line 15

Class

RegistrantViewsData
Provides views data for registrant entities.

Namespace

Drupal\rng\Views

Code

public function getViewsData() {
  $data = parent::getViewsData();
  $data['registrant']['table']['join']['registration_field_data'] = [
    'left_field' => 'id',
    'field' => 'registration',
  ];
  return $data;
}