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