template_preprocess_aggregator_feed(&$variables)
Prepares variables for aggregator feed templates.
Default template: aggregator-feed.html.twig.
array $variables: An associative array containing:
function template_preprocess_aggregator_feed(&$variables) {
$feed = $variables['elements']['#aggregator_feed'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
$variables['full'] = $variables['elements']['#view_mode'] == 'full';
$variables['title'] = $feed->label();
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!aggregator!aggregator.theme.inc/function/template_preprocess_aggregator_feed/8.1.x