You are here

AggregatorRefresh.php in Drupal 8

File

core/modules/aggregator/src/Plugin/QueueWorker/AggregatorRefresh.php
View source
<?php

namespace Drupal\aggregator\Plugin\QueueWorker;

use Drupal\aggregator\FeedInterface;
use Drupal\Core\Queue\QueueWorkerBase;

/**
 * Updates a feed's items.
 *
 * @QueueWorker(
 *   id = "aggregator_feeds",
 *   title = @Translation("Aggregator refresh"),
 *   cron = {"time" = 60}
 * )
 */
class AggregatorRefresh extends QueueWorkerBase {

  /**
   * {@inheritdoc}
   */
  public function processItem($data) {
    if ($data instanceof FeedInterface) {
      $data
        ->refreshItems();
    }
  }

}

Classes

Namesort descending Description
AggregatorRefresh Updates a feed's items.