theme_region_test.module

Same filename in other branches
  1. 9 core/modules/system/tests/modules/theme_region_test/theme_region_test.module
  2. 8.9.x core/modules/system/tests/modules/theme_region_test/theme_region_test.module
  3. 11.x core/modules/system/tests/modules/theme_region_test/theme_region_test.module

Provides hook implementations for testing purposes.

File

core/modules/system/tests/modules/theme_region_test/theme_region_test.module

View source
<?php


/**
 * @file
 * Provides hook implementations for testing purposes.
 */

/**
 * Implements hook_preprocess_HOOK() for region templates.
 */
function theme_region_test_preprocess_region(&$variables) {
    if ($variables['region'] == 'sidebar_first') {
        $variables['attributes']['class'][] = 'new_class';
    }
}

Functions

Title Deprecated Summary
theme_region_test_preprocess_region Implements hook_preprocess_HOOK() for region templates.

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