AggregatorRefresh.php in Drupal 8
Same filename and directory in other branches
Namespace
Drupal\aggregator\Plugin\QueueWorkerFile
core/modules/aggregator/src/Plugin/QueueWorker/AggregatorRefresh.phpView 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
Name | Description |
---|---|
AggregatorRefresh | Updates a feed's items. |