raven.module in Raven: Sentry Integration 8
Same filename and directory in other branches
File
raven.moduleView source
<?php
/**
* Implements hook_page_attachments().
*/
function raven_page_attachments(array &$page) {
if (\Drupal::config('raven.settings')
->get('javascript_error_handler') && \Drupal::currentUser()
->hasPermission('send javascript errors to sentry')) {
$page['#attached']['drupalSettings']['raven']['dsn'] = \Drupal::config('raven.settings')
->get('public_dsn');
// Other modules can attach Raven.js options to the page.
$page['#attached']['drupalSettings']['raven']['options'] = new \stdClass();
$page['#attached']['library'][] = 'raven/raven';
}
}
Functions
Name | Description |
---|---|
raven_page_attachments | Implements hook_page_attachments(). |