You are here

public function LibraryTransactionViewsData::getViewsData in Library 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/LibraryTransactionViewsData.php, line 16

Class

LibraryTransactionViewsData
Provides Views data for Library transaction entities.

Namespace

Drupal\library\Entity

Code

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