unversioned_assets_test.module

Same filename and directory in other branches
  1. 11.x core/modules/system/tests/modules/unversioned_assets_test/unversioned_assets_test.module

Helper module for unversioned asset test.

File

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

View source
<?php


/**
 * @file
 * Helper module for unversioned asset test.
 */


/**
 * 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.