function UnversionedAssetsTestHooks::libraryInfoAlter
Implements hook_library_info_alter().
File
-
core/
modules/ system/ tests/ modules/ unversioned_assets_test/ src/ Hook/ UnversionedAssetsTestHooks.php, line 17
Class
- UnversionedAssetsTestHooks
- Hook implementations for unversioned_assets_test.
Namespace
Drupal\unversioned_assets_test\HookCode
public function libraryInfoAlter(&$libraries, $extension) : void {
if ($extension === 'system') {
// Remove the version and provide an additional CSS file we can alter the
// contents of .
unset($libraries['base']['version']);
$libraries['base']['css']['component']['public://test.css'] = [
'weight' => -10,
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.