function CommonTestThemeHooks::preprocess
Implements hook_preprocess().
Attributes
#[Hook('preprocess')]
See also
RenderTest::testDrupalRenderThemePreprocessAttached()
File
-
core/
modules/ system/ tests/ modules/ common_test/ src/ Hook/ CommonTestThemeHooks.php, line 144
Class
- CommonTestThemeHooks
- Hook implementations for common_test.
Namespace
Drupal\common_test\HookCode
public function preprocess(&$variables, $hook) : void {
if (!\Drupal::state()->get('theme_preprocess_attached_test', FALSE)) {
return;
}
$variables['#attached']['library'][] = 'test/generic_preprocess';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.