You are here

public function LinkViewsData::getViewsData in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Entity/LinkViewsData.php \Drupal\colossal_menu\Entity\LinkViewsData::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/Entity/LinkViewsData.php, line 16

Class

LinkViewsData
Provides Views data for Link entities.

Namespace

Drupal\colossal_menu\Entity

Code

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