You are here

function webform_content_creator_page_attachments in Webform Content Creator 3.x

Same name and namespace in other branches
  1. 8 webform_content_creator.module \webform_content_creator_page_attachments()
  2. 2.x webform_content_creator.module \webform_content_creator_page_attachments()

Implements hook_page_attachments().

File

./webform_content_creator.module, line 94
Allows to call functions after creating/editing/deleting webform submissions.

Code

function webform_content_creator_page_attachments(array &$attachments) {
  $route_name = \Drupal::routeMatch()
    ->getRouteName();
  if ($route_name === 'entity.webform_content_creator.manage_fields_form') {
    $attachments['#attached']['library'][] = 'webform_content_creator/webform_content_creator';
  }
}