"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/modules/aggregator/src/Plugin/migrate/source/AggregatorItem.php" (26 Nov 2020, 1197 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "AggregatorItem.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 
    3 namespace Drupal\aggregator\Plugin\migrate\source;
    4 
    5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
    6 
    7 /**
    8  * Drupal aggregator item source from database.
    9  *
   10  * @MigrateSource(
   11  *   id = "aggregator_item",
   12  *   source_module = "aggregator"
   13  * )
   14  */
   15 class AggregatorItem extends DrupalSqlBase {
   16 
   17   /**
   18    * {@inheritdoc}
   19    */
   20   public function query() {
   21     return $this->select('aggregator_item', 'ai')
   22       ->fields('ai')
   23       ->orderBy('ai.iid');
   24   }
   25 
   26   /**
   27    * {@inheritdoc}
   28    */
   29   public function fields() {
   30     return [
   31       'iid' => $this->t('Primary Key: Unique ID for feed item.'),
   32       'fid' => $this->t('The {aggregator_feed}.fid to which this item belongs.'),
   33       'title' => $this->t('Title of the feed item.'),
   34       'link' => $this->t('Link to the feed item.'),
   35       'author' => $this->t('Author of the feed item.'),
   36       'description' => $this->t('Body of the feed item.'),
   37       'timestamp' => $this->t('Post date of feed item, as a Unix timestamp.'),
   38       'guid' => $this->t('Unique identifier for the feed item.'),
   39     ];
   40   }
   41 
   42   /**
   43    * {@inheritdoc}
   44    */
   45   public function getIds() {
   46     $ids['iid']['type'] = 'integer';
   47     return $ids;
   48   }
   49 
   50 }