function common_test_preprocess
Same name in other branches
- 8.9.x core/modules/system/tests/modules/common_test/common_test.module \common_test_preprocess()
- 10 core/modules/system/tests/modules/common_test/common_test.module \common_test_preprocess()
- 11.x core/modules/system/tests/modules/common_test/common_test.module \common_test_preprocess()
Implements MODULE_preprocess().
See also
RenderTest::testDrupalRenderThemePreprocessAttached()
File
-
core/
modules/ system/ tests/ modules/ common_test/ common_test.module, line 132
Code
function common_test_preprocess(&$variables, $hook) {
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.