Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 4 |
AggregatorRefresh | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 4 |
processItem | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 4 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\aggregator\Plugin\QueueWorker\AggregatorRefresh. | |
*/ | |
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(); | |
} | |
} | |
} |