You are here

public function TwitterWidgetViewsData::getViewsData in Twitter Profile Widget 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/TwitterWidgetViewsData.php, line 16

Class

TwitterWidgetViewsData
Provides Views data for Twitter widget entities.

Namespace

Drupal\twitter_profile_widget\Entity

Code

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