public function Feed::refreshItems in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/aggregator/src/Entity/Feed.php \Drupal\aggregator\Entity\Feed::refreshItems()
Updates the feed items by triggering the import process.
This will also update the last checked time of the feed and save it.
Return value
bool TRUE if there is new content for the feed FALSE otherwise.
Overrides FeedInterface::refreshItems
See also
\Drupal\aggregator\ItemsImporterInterface::refresh()
File
- core/
modules/ aggregator/ src/ Entity/ Feed.php, line 81 - Contains \Drupal\aggregator\Entity\Feed.
Class
- Feed
- Defines the aggregator feed entity class.
Namespace
Drupal\aggregator\EntityCode
public function refreshItems() {
$success = \Drupal::service('aggregator.items.importer')
->refresh($this);
// Regardless of successful or not, indicate that it has been checked.
$this
->setLastCheckedTime(REQUEST_TIME);
$this
->setQueuedTime(0);
$this
->save();
return $success;
}