diff --git a/core/modules/block_place/block_place.module b/core/modules/block_place/block_place.module index 34f1866..dc0b7ef 100644 --- a/core/modules/block_place/block_place.module +++ b/core/modules/block_place/block_place.module @@ -89,18 +89,18 @@ function block_place_toolbar() { } /** - * Implements hook_page_top(). + * Implements hook_page_attachments(). * * Add block place library if dialog should be open to sort blocks. */ -function block_place_page_top(array &$page_top) { +function block_place_page_attachments(array &$attachments) { if ($region_sort = \Drupal::request()->query->get('block-place-region-sort')) { - $page_top['#attached']['library'][] = 'block_place/drupal.block_place.js'; + $attachments['#attached']['library'][] = 'block_place/drupal.block_place.js'; $destination = \Drupal::destination()->get(); $destination = explode('?', $destination)[0]; $theme = \Drupal::theme()->getActiveTheme(); $url = Url::fromRoute('block_place.sort', ['region' => $region_sort, 'theme' => $theme->getName()], ['query' => ['destination' => $destination]]); - $page_top['#attached']['drupalSettings']['block_place'] = [ + $attachments['#attached']['drupalSettings']['block_place'] = [ 'dialog_url' => $url->setAbsolute()->toString(), // @todo Always use 'off_canvas' in https://www.drupal.org/node/2784443. 'dialog_type' => \Drupal::moduleHandler()->moduleExists('outside_in') ? 'dialog_off_canvas' : 'modal',