public function MediaViewsData::getViewsData in Media entity 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/
MediaViewsData.php, line 15
Class
- MediaViewsData
- Provides the views data for the media entity type.
Namespace
Drupal\media_entityCode
public function getViewsData() {
$data = parent::getViewsData();
$data['media_field_data']['table']['wizard_id'] = 'media';
$data['media_field_revision']['table']['wizard_id'] = 'media_revision';
$data['media']['media_bulk_form'] = [
'title' => $this
->t('Media operations bulk form'),
'help' => $this
->t('Add a form element that lets you run operations on multiple media entities.'),
'field' => [
'id' => 'media_bulk_form',
],
];
return $data;
}