function colorbox_inline_page_attachments in Colorbox Inline 8
Implements hook_page_attachments().
File
- ./
colorbox_inline.module, line 13 - Enable the "colorbox inline" functionality for Drupal 8.
Code
function colorbox_inline_page_attachments(array &$page) {
\Drupal::service('colorbox.attachment')
->attach($page);
$page['#attached']['library'][] = 'colorbox_inline/colorbox_inline';
}