function unversioned_assets_test_library_info_alter

Same name and namespace in other branches
  1. 10 core/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module \unversioned_assets_test_library_info_alter()

Implements hook_library_info_build().

File

core/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module, line 11

Code

function unversioned_assets_test_library_info_alter(&$libraries, $extension) {
    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.