3aaaa600ff27484abe4401aa84a7b008e7c40844
[yaffs-website] / web / core / modules / aggregator / src / AggregatorItemViewsData.php
1 <?php
2
3 namespace Drupal\aggregator;
4
5 use Drupal\views\EntityViewsData;
6
7 /**
8  * Provides the views data for the aggregator item entity type.
9  */
10 class AggregatorItemViewsData extends EntityViewsData {
11
12   /**
13    * {@inheritdoc}
14    */
15   public function getViewsData() {
16     $data = parent::getViewsData();
17
18     $data['aggregator_item']['table']['base']['help'] = $this->t('Aggregator items are imported from external RSS and Atom news feeds.');
19
20     $data['aggregator_item']['iid']['help'] = $this->t('The unique ID of the aggregator item.');
21     $data['aggregator_item']['iid']['argument']['id'] = 'aggregator_iid';
22     $data['aggregator_item']['iid']['argument']['name field'] = 'title';
23     $data['aggregator_item']['iid']['argument']['numeric'] = TRUE;
24
25     $data['aggregator_item']['title']['help'] = $this->t('The title of the aggregator item.');
26     $data['aggregator_item']['title']['field']['default_formatter'] = 'aggregator_title';
27
28     $data['aggregator_item']['link']['help'] = $this->t('The link to the original source URL of the item.');
29
30     $data['aggregator_item']['author']['help'] = $this->t('The author of the original imported item.');
31
32     $data['aggregator_item']['author']['field']['default_formatter'] = 'aggregator_xss';
33
34     $data['aggregator_item']['guid']['help'] = $this->t('The guid of the original imported item.');
35
36     $data['aggregator_item']['description']['help'] = $this->t('The actual content of the imported item.');
37     $data['aggregator_item']['description']['field']['default_formatter'] = 'aggregator_xss';
38     $data['aggregator_item']['description']['field']['click sortable'] = FALSE;
39
40     $data['aggregator_item']['timestamp']['help'] = $this->t('The date the original feed item was posted. (With some feeds, this will be the date it was imported.)');
41
42     return $data;
43   }
44
45 }