view core/modules/aggregator/src/FeedStorage.php @ 11:bfffd8d7479a

Move drupal/core from "replace" to "require" section, to ensure Composer updates it
author Chris Cannam
date Fri, 23 Feb 2018 15:51:18 +0000
parents 4c8ae668cc8c
children 129ea1e6d783
line wrap: on
line source
<?php

namespace Drupal\aggregator;

use Drupal\Core\Entity\Sql\SqlContentEntityStorage;

/**
 * Controller class for aggregator's feeds.
 *
 * This extends the Drupal\Core\Entity\Sql\SqlContentEntityStorage 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 {aggregator_feed} WHERE queued = 0 AND checked + refresh < :time AND refresh <> :never', [
      ':time' => REQUEST_TIME,
      ':never' => AGGREGATOR_CLEAR_NEVER,
    ])->fetchCol();
  }

}