You are here

FeedStorage.php in Drupal 9

Same filename and directory in other branches
  1. 8 core/modules/aggregator/src/FeedStorage.php

Namespace

Drupal\aggregator

File

core/modules/aggregator/src/FeedStorage.php
View source
<?php

namespace Drupal\aggregator;

use Drupal\Core\Entity\Sql\SqlContentEntityStorage;

/**
 * Defines the storage handler class for feed entities.
 *
 * This extends the base storage class, adding required special handling for
 * feed entities.
 */
class FeedStorage extends SqlContentEntityStorage implements FeedStorageInterface {

  /**
   * {@inheritdoc}
   */
  public function getFeedIdsToRefresh() {
    return $this->database
      ->query('SELECT [fid] FROM {' . $this
      ->getBaseTable() . '} WHERE [queued] = 0 AND [checked] + [refresh] < :time AND [refresh] <> :never', [
      ':time' => REQUEST_TIME,
      ':never' => static::CLEAR_NEVER,
    ])
      ->fetchCol();
  }

}

Classes

Namesort descending Description
FeedStorage Defines the storage handler class for feed entities.