You are here

function shurly_page_attachments in ShURLy 8

Implements hook_page_attachments().

File

./shurly.module, line 22
Description http://www.youtube.com/watch?v=Qo7qoonzTCE.

Code

function shurly_page_attachments(array &$attachments) {
  if (\Drupal::routeMatch()
    ->getRouteName() == 'shurly.create') {
    $attachments['#attached']['library'][] = 'shurly/clipboardjs';
    $attachments['#attached']['library'][] = 'shurly/shurly';
  }
}