8.2.x common_test.module common_test_preprocess(&$variables, $hook)
8.0.x common_test.module common_test_preprocess(&$variables, $hook)
8.1.x common_test.module common_test_preprocess(&$variables, $hook)
8.3.x common_test.module common_test_preprocess(&$variables, $hook)

Implements MODULE_preprocess().

See also

RenderTest::testDrupalRenderThemePreprocessAttached()

File

core/modules/system/tests/modules/common_test/common_test.module, line 150
Helper module for the Common tests.

Code

function common_test_preprocess(&$variables, $hook) {
  if (!\Drupal::state()->get('theme_preprocess_attached_test', FALSE)) {
    return;
  }
  $variables['#attached']['library'][] = 'test/generic_preprocess';
}