You are here

crm_core.module in CRM Core 8

Same filename and directory in other branches
  1. 8.3 crm_core.module
  2. 8.2 crm_core.module
  3. 7 crm_core.module

CRM Core module hooks.

File

crm_core.module
View source
<?php

/**
 * @file
 * CRM Core module hooks.
 */
use Drupal\Core\Url;

/**
 * Implements hook_page_attachments().
 */
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';
  }
}

Functions