Version 1
[yaffs-website] / web / modules / contrib / fontyourface / src / Entity / FontViewsData.php
1 <?php
2
3 namespace Drupal\fontyourface\Entity;
4
5 use Drupal\views\EntityViewsData;
6 use Drupal\views\EntityViewsDataInterface;
7
8 /**
9  * Provides Views data for Font entities.
10  */
11 class FontViewsData extends EntityViewsData implements EntityViewsDataInterface {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function getViewsData() {
17     $data = parent::getViewsData();
18
19     $data['fontyourface_font']['pid']['filter'] = [
20       'id' => 'fontyourface_font_pid',
21     ];
22
23     $data['fontyourface_font']['css_style']['filter'] = [
24       'id' => 'fontyourface_font_style',
25     ];
26
27     $data['fontyourface_font']['css_weight']['filter'] = [
28       'id' => 'fontyourface_font_weight',
29     ];
30
31     return $data;
32   }
33
34 }