<?php

/**
 * @file
 * Install, update and uninstall functions for the Admin Toolbar Tools module.
 */

/**
 * Install the Admin Toolbar Search module.
 */
function admin_toolbar_tools_update_8001() {
  // Installing the Admin Toolbar Search module.
  \Drupal::service('module_installer')->install(['admin_toolbar_search']);
}

/**
 * Default setting for maximum number of bundles per entity type to display.
 */
function admin_toolbar_tools_update_8201() {
  \Drupal::service('config.factory')
    ->getEditable('admin_toolbar_tools.settings')
    ->set('max_bundle_number', 20)
    ->save(TRUE);
}

/**
 * Default setting for enable hoverintent.
 */
function admin_toolbar_tools_update_8202() {
  \Drupal::service('config.factory')
    ->getEditable('admin_toolbar_tools.settings')
    ->set('hoverintent_functionality', TRUE)
    ->save(TRUE);
}
