public function SnippetBuilder::pageAttachment in Hotjar 8.2
Same name and namespace in other branches
- 8 src/SnippetBuilder.php \Drupal\hotjar\SnippetBuilder::pageAttachment()
Implements hook_page_attachment().
Overrides SnippetBuilderInterface::pageAttachment
File
- src/
SnippetBuilder.php, line 128
Class
- SnippetBuilder
- Snippet builder service.
Namespace
Drupal\hotjarCode
public function pageAttachment(array &$attachments) {
if ($this->settings
->getSetting('attachment_mode') === HotjarSettingsInterface::ATTACHMENT_MODE_DRUPAL_SETTINGS) {
$this
->pageAttachmentDrupalSettings($attachments);
}
else {
$this
->pageAttachmentBuilt($attachments);
}
}