ThemeRegionTestThemeHooks.php
Namespace
Drupal\theme_region_test\HookFile
-
core/
modules/ system/ tests/ modules/ theme_region_test/ src/ Hook/ ThemeRegionTestThemeHooks.php
View source
<?php
declare (strict_types=1);
namespace Drupal\theme_region_test\Hook;
use Drupal\Core\Hook\Attribute\Hook;
/**
* Hook implementations for theme_region_test.
*/
class ThemeRegionTestThemeHooks {
/**
* Implements hook_preprocess_HOOK() for region templates.
*/
public function preprocessRegion(&$variables) : void {
if ($variables['region'] == 'sidebar_first') {
$variables['attributes']['class'][] = 'new_class';
}
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
ThemeRegionTestThemeHooks | Hook implementations for theme_region_test. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.