function theme_region_test_preprocess_region

Implements hook_preprocess_HOOK() for region templates.

File

core/modules/system/tests/modules/theme_region_test/theme_region_test.module, line 11

Code

function theme_region_test_preprocess_region(&$variables) {
  if ($variables['region'] == 'sidebar_first') {
    $variables['attributes']['class'][] = 'new_class';
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.