function crm_core_page_attachments in CRM Core 8
Same name and namespace in other branches
- 8.3 crm_core.module \crm_core_page_attachments()
- 8.2 crm_core.module \crm_core_page_attachments()
Implements hook_page_attachments().
File
- ./
crm_core.module, line 13 - CRM Core module hooks.
Code
function crm_core_page_attachments(array &$attachments) {
if (Url::fromRoute('crm_core.overview')
->access() && \Drupal::currentUser()
->hasPermission('access toolbar')) {
$attachments['#attached']['library'][] = 'crm_core/admin';
}
}