You are here

views_ef_fieldset.install in Views Exposed Form Fieldset 8

File

views_ef_fieldset.install
View source
<?php

/**
 * @file
 * Module install file.
 */
declare (strict_types=1);

/**
 * Implements hook_install().
 */
function views_ef_fieldset_install() {
  \Drupal::configFactory()
    ->getEditable('views.settings')
    ->set('display_extenders', [
    'views_ef_fieldset',
  ])
    ->save();
}

/**
 * Implements hook_uninstall().
 */
function views_ef_fieldset_uninstall() {
  $config = \Drupal::config('views.settings')
    ->get('display_extenders');
  if (($key = array_search('views_ef_fieldset', $config, TRUE)) !== FALSE) {
    unset($config[$key]);
  }
  \Drupal::configFactory()
    ->getEditable('views.settings')
    ->set('display_extenders', $config)
    ->save();
}

Functions