unversioned_assets_test.module

Same filename in other branches
  1. 10 core/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module

File

core/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module

View source
<?php


/**
 * @file
 * Helper module for unversioned asset test.
 */
declare (strict_types=1);

/**
 * Implements hook_library_info_build().
 */
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,
        ];
    }
}

Functions

Title Deprecated Summary
unversioned_assets_test_library_info_alter Implements hook_library_info_build().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.