function ThemeTestHooks::extensionInfoAlter
Implements hook_extension_info_alter().
Attributes
#[Hook('extension_info_alter')]
See also
\Drupal\system\Tests\Theme\ThemeInfoTest::testChanges()
File
-
core/
modules/ system/ tests/ modules/ theme_test/ src/ Hook/ ThemeTestHooks.php, line 256
Class
- ThemeTestHooks
- Hook implementations for theme_test.
Namespace
Drupal\theme_test\HookCode
public function extensionInfoAlter(array &$info, Extension $file, $type) : void {
if ($type == 'theme' && $file->getName() == 'test_theme' && \Drupal::state()->get('theme_test.modify_info_files')) {
// Add a library to see if the system picks it up.
$info += [
'libraries' => [],
];
$info['libraries'][] = 'core/once';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.