public AggregatorController::feedRefresh(FeedInterface $aggregator_feed)
Refreshes a feed, then redirects to the overview page.
Parameters
\Drupal\aggregator\FeedInterface $aggregator_feed: An object describing the feed to be refreshed.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse A redirection to the admin overview page.
Throws
\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException If the query token is missing or invalid.
File
- core/modules/aggregator/src/Controller/AggregatorController.php, line 95
Class
- AggregatorController
- Returns responses for aggregator module routes.
Namespace
Drupal\aggregator\Controller
Code
public function feedRefresh(FeedInterface $aggregator_feed) {
$message = $aggregator_feed->refreshItems()
? $this->t('There is new syndicated content from %site.', array('%site' => $aggregator_feed->label()))
: $this->t('There is no new syndicated content from %site.', array('%site' => $aggregator_feed->label()));
drupal_set_message($message);
return $this->redirect('aggregator.admin_overview');
}
Please login to continue.