Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / aggregator / src / Plugin / migrate / source / AggregatorFeed.php
1 <?php
2
3 namespace Drupal\aggregator\Plugin\migrate\source;
4
5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
6
7 /**
8  * Drupal feed source from database.
9  *
10  * @MigrateSource(
11  *   id = "aggregator_feed",
12  *   source_module = "aggregator"
13  * )
14  */
15 class AggregatorFeed extends DrupalSqlBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   public function query() {
21     return $this->select('aggregator_feed', 'af')
22       ->fields('af');
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   public function fields() {
29     $fields = [
30       'fid' => $this->t('The feed ID.'),
31       'title' => $this->t('Title of the feed.'),
32       'url' => $this->t('URL to the feed.'),
33       'refresh' => $this->t('Refresh frequency in seconds.'),
34       'checked' => $this->t('Last-checked unix timestamp.'),
35       'link' => $this->t('Parent website of the feed.'),
36       'description' => $this->t("Parent website's description of the feed."),
37       'image' => $this->t('An image representing the feed.'),
38       'etag' => $this->t('Entity tag HTTP response header.'),
39       'modified' => $this->t('When the feed was last modified.'),
40       'block' => $this->t("Number of items to display in the feed's block."),
41     ];
42     if ($this->getModuleSchemaVersion('system') >= 7000) {
43       $fields['queued'] = $this->t('Time when this feed was queued for refresh, 0 if not queued.');
44     }
45     return $fields;
46   }
47
48   /**
49    * {@inheritdoc}
50    */
51   public function getIds() {
52     $ids['fid']['type'] = 'integer';
53     return $ids;
54   }
55
56 }