template_preprocess_region(&$variables)
Prepares variables for region templates.
Default template: region.html.twig.
Prepares the values passed to the theme_region function to be passed into a pluggable template engine. Uses the region name to generate a template file suggestions.
array $variables: An associative array containing:
function template_preprocess_region(&$variables) { // Create the $content variable that templates expect. $variables['content'] = $variables['elements']['#children']; $variables['region'] = $variables['elements']['#region']; }
© 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!includes!theme.inc/function/template_preprocess_region/8.1.x