function rules_page_attachments

Implements hook_page_attachments().

File

./rules.module, line 58

Code

function rules_page_attachments(array &$attachments) {
    // We need JavaScript and CSS to render the debug log properly
    // and to provide the expand/collapse functionality.
    if (\Drupal::currentUser()->hasPermission('access rules debug')) {
        if (\Drupal::config('rules.settings')->get('debug_log.enabled')) {
            $attachments['#attached']['library'][] = 'rules/rules.debug';
        }
    }
}