function gutenberg_views_pre_render in Gutenberg 8
Same name and namespace in other branches
- 8.2 gutenberg.module \gutenberg_views_pre_render()
Implements hook_views_pre_render().
File
- ./
gutenberg.module, line 1024 - Provides integration with the Gutenberg editor.
Code
function gutenberg_views_pre_render(ViewExecutable $view) {
if ($view
->id() == "reusable_blocks" && $view->current_display == 'page_1') {
// Attached Gutenberg's basic style to reusable blocks view.
$view->element['#attached']['library'][] = 'gutenberg/admin';
$view->element['#attached']['library'][] = 'gutenberg/blocks-view';
}
}