+
+ // Create an attributes variable for each region.
+ foreach (Element::children($variables['content']) as $name) {
+ if (!isset($variables['content'][$name]['#attributes'])) {
+ $variables['content'][$name]['#attributes'] = [];
+ }
+ $variables['region_attributes'][$name] = new Attribute($variables['content'][$name]['#attributes']);
+ }