function views_attach_library_install in Views Attach Library 8
Same name and namespace in other branches
- 8.x views_attach_library.install \views_attach_library_install()
- 2.0.x views_attach_library.install \views_attach_library_install()
Implements hook_install().
File
- ./
views_attach_library.install, line 11 - Various install/uninstall hooks for the attach library views module.
Code
function views_attach_library_install() {
// Enable library_in_views_display_extender plugin.
$config = \Drupal::service('config.factory')
->getEditable('views.settings');
$display_extenders = $config
->get('display_extenders') ?: [];
$display_extenders[] = 'library_in_views_display_extender';
$config
->set('display_extenders', $display_extenders);
$config
->save();
}