summaryrefslogtreecommitdiffstats
path: root/core/modules/media/src/MediaViewsData.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/media/src/MediaViewsData.php')
-rw-r--r--core/modules/media/src/MediaViewsData.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/modules/media/src/MediaViewsData.php b/core/modules/media/src/MediaViewsData.php
new file mode 100644
index 0000000..7a038cf
--- /dev/null
+++ b/core/modules/media/src/MediaViewsData.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\media;
+
+use Drupal\views\EntityViewsData;
+
+/**
+ * Provides the Views data for the media entity type.
+ */
+class MediaViewsData extends EntityViewsData {
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getViewsData() {
+ $data = parent::getViewsData();
+
+ $data['media_field_data']['table']['wizard_id'] = 'media';
+ $data['media_field_revision']['table']['wizard_id'] = 'media_revision';
+
+ return $data;
+ }
+
+}