template_preprocess_aggregator_feed(&$variables)
Prepares variables for aggregator feed templates.
Default template: aggregator-feed.html.twig.
Parameters
array $variables: An associative array containing:
- elements: An array of elements to display in view mode.
File
- core/modules/aggregator/aggregator.theme.inc, line 41
- Preprocessors and theme functions of Aggregator module.
Code
1 2 3 4 5 6 7 8 9 10 | 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(); } |
Please login to continue.