public function KeywordViewsData::getViewsData in Alinks 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/ KeywordViewsData.php, line 16
Class
- KeywordViewsData
- Provides Views data for keyword entities.
Namespace
Drupal\alinks\EntityCode
public function getViewsData() {
$data = parent::getViewsData();
$data['alink_keyword']['table']['base'] = [
'field' => 'id',
'title' => $this
->t('Keyword entity'),
'help' => $this
->t('Keyword entity ID.'),
];
$data['alink_keyword_field_data']['table']['join'] = array(
'alink_keyword' => array(
'field' => 'id',
'left_field' => 'id',
),
);
return $data;
}