function script_manager_page_top in Script Manager 8
Implements hook_page_top().
File
- ./
script_manager.module, line 23 - Manage JavaScript snippets included in your website.
Code
function script_manager_page_top(&$page) {
$page['script_manager'] = \Drupal::service('class_resolver')
->getInstanceFromDefinition(ScriptPlacementManager::class)
->getRenderedScriptsForPosition(ScriptInterface::POSITION_TOP);
}