public function LibraryItemViewsData::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/ LibraryItemViewsData.php, line 16
Class
- LibraryItemViewsData
- Provides Views data for Library item entities.
Namespace
Drupal\library\EntityCode
public function getViewsData() {
$data = parent::getViewsData();
$data['library_item']['table']['base'] = [
'field' => 'id',
'title' => $this
->t('Library item'),
'help' => $this
->t('The Library item ID.'),
];
return $data;
}