private function PageContext::getJavaScriptTagRenderArray in Acquia Lift Connector 8.4
Same name and namespace in other branches
- 8.3 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::getJavaScriptTagRenderArray()
Get the render array for a JavaScript tag.
Return value
array The render array
1 call to PageContext::getJavaScriptTagRenderArray()
- PageContext::populateHtmlHead in src/
Service/ Context/ PageContext.php - Populate page's HTML head.
File
- src/
Service/ Context/ PageContext.php, line 386
Class
Namespace
Drupal\acquia_lift\Service\ContextCode
private function getJavaScriptTagRenderArray() {
return [
[
'#tag' => 'script',
'#attributes' => [
'src' => $this->assetsUrl . '/' . SELF::LIFT_JS_FILENAME,
'async' => true,
],
],
'acquia_lift_javascript',
];
}