You are here

public function BadgeViewsData::getViewsData in User Badges 8

Returns views data for the entity type.

Return value

array Views data in the format of hook_views_data().

Overrides EntityViewsData::getViewsData

File

src/Entity/BadgeViewsData.php, line 20
Contains \Drupal\user_badges\Entity\Badge.

Class

BadgeViewsData
Provides Views data for Badge entities.

Namespace

Drupal\user_badges\Entity

Code

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