You are here

function gin_lb_page_attachments in Gin Layout Builder 1.0.x

Implements hook_page_attachments().

File

./gin_lb.module, line 400
Provides hooks for gin_lb module.

Code

function gin_lb_page_attachments(array &$attachments) {
  if (gin_lb_is_layout_builder_route()) {
    $attachments['#attached']['library'][] = 'gin_lb/gin_lb_init';
    $attachments['#attached']['library'][] = 'gin/gin_ckeditor';
    $attachments['#attached']['library'][] = 'claro/claro.jquery.ui';
    $attachments['#attached']['library'][] = 'claro/claro.drupal.dialog';
    $attachments['#attached']['library'][] = 'gin_lb/gin_lb_form';
    $config = \Drupal::config('gin_lb.settings');
    if ($config
      ->get('toastify_cdn')) {
      $attachments['#attached']['library'][] = 'gin_lb/toastify';
    }
  }
}