You are here

function bear_paragraph_two_column_page_attachments in Bear 8.2

Same name and namespace in other branches
  1. 8 modules/custom/bear_paragraph_two_column/bear_paragraph_two_column.module \bear_paragraph_two_column_page_attachments()

Implements hook_page_attachments().

File

modules/custom/bear_paragraph_two_column/bear_paragraph_two_column.module, line 11
Customizations related to the Two Column paragraph bundle.

Code

function bear_paragraph_two_column_page_attachments(array &$attachments) {
  $is_admin = \Drupal::service('router.admin_context')
    ->isAdminRoute();
  if ($is_admin) {
    $attachments['#attached']['library'][] = 'bear_paragraph_two_column/node-form';
  }
}