/** * Refreshes a feed, then redirects to the overview page. * * @param \Drupal\aggregator\FeedInterface $aggregator_feed * An object describing the feed to be refreshed. * * @return \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. */ 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'); }