You are here

public function FlippingBookViewsData::getViewsData in Flipping Book 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/FlippingBookViewsData.php, line 16

Class

FlippingBookViewsData
Provides Views data for Flipping Book entities.

Namespace

Drupal\flipping_book\Entity

Code

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