AggregatorRefresh.php

Same filename and directory in other branches
  1. 8.9.x core/modules/aggregator/src/Plugin/QueueWorker/AggregatorRefresh.php

Namespace

Drupal\aggregator\Plugin\QueueWorker

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

Title Deprecated Summary
AggregatorRefresh Updates a feed's items.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.