function common_test_library_info_alter in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/common_test/common_test.module \common_test_library_info_alter()
Implements hook_library_info_alter().
File
- core/
modules/ system/ tests/ modules/ common_test/ common_test.module, line 190 - Helper module for the Common tests.
Code
function common_test_library_info_alter(&$libraries, $module) {
if ($module == 'core' && isset($libraries['jquery.farbtastic'])) {
// Change the version of Farbtastic to 0.0.
$libraries['jquery.farbtastic']['version'] = '0.0';
// Make Farbtastic depend on jQuery Form to test library dependencies.
$libraries['jquery.farbtastic']['dependencies'][] = 'core/jquery.form';
}
// Alter the dynamically registered library definition.
if ($module == 'common_test' && isset($libraries['dynamic_library'])) {
$libraries['dynamic_library']['dependencies'] = [
'core/jquery',
];
}
}