Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / redirect / src / RedirectViewsData.php
1 <?php
2
3 namespace Drupal\redirect;
4
5 use Drupal\views\EntityViewsData;
6
7 /**
8  * Provides views integration for Redirect entities.
9  */
10 class RedirectViewsData extends EntityViewsData {
11
12   /**
13    * {@inheritdoc}
14    */
15   public function getViewsData() {
16     $data = parent::getViewsData();
17
18     // Views defaults to the 'redirect_source' field that is configured as
19     // the redirect label. Since this is a composed field, change the default
20     // field to its 'path' value.
21     $data['redirect']['table']['base']['defaults']['field'] = 'redirect_source__path';
22     return $data;
23   }
24
25 }