We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke hook_library and create library definitions
hook_library
Seems like it's best to decorate and implement \Drupal\Core\Asset\LibraryDiscoveryParser::buildByExtension
Example
function overlay_library() { $module_path = drupal_get_path('module', 'overlay'); // Overlay parent. $libraries['parent'] = array( 'title' => 'Overlay: Parent', 'website' => 'http://drupal.org/documentation/modules/overlay', 'version' => '1.0', 'js' => array( $module_path . '/overlay-parent.js' => array(), ), 'css' => array( $module_path . '/overlay-parent.css' => array(), ), 'dependencies' => array( array('system', 'ui'), array('system', 'jquery.bbq'), ), ); // Overlay child. $libraries['child'] = array( 'title' => 'Overlay: Child', 'website' => 'http://drupal.org/documentation/modules/overlay', 'version' => '1.0', 'js' => array( $module_path . '/overlay-child.js' => array(), ), 'css' => array( $module_path . '/overlay-child.css' => array(), ), ); return $libraries; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Invoke
hook_library
and create library definitionsSeems like it's best to decorate and implement \Drupal\Core\Asset\LibraryDiscoveryParser::buildByExtension
Example
The text was updated successfully, but these errors were encountered: