forked from a64f7bb4-7358-4778-9fbe-3b882c34cc1d/v1
31 lines
728 B
PHP
31 lines
728 B
PHP
<?php
|
|
|
|
/**
|
|
* @file
|
|
* Install, update and uninstall functions for the Admin Toolbar module.
|
|
*/
|
|
|
|
/**
|
|
* Rebuild routes to mitigate issue 2938884.
|
|
*
|
|
* @see https://www.drupal.org/project/admin_toolbar/issues/2938884
|
|
*/
|
|
function admin_toolbar_update_8001() {
|
|
// Rebuilding the route cache.
|
|
\Drupal::service("router.builder")->rebuild();
|
|
}
|
|
|
|
/**
|
|
* Add menu_depth param into the config.
|
|
*
|
|
* @see https://www.drupal.org/project/admin_toolbar/issues/3200542
|
|
*/
|
|
function admin_toolbar_update_8002() {
|
|
$config_factory = \Drupal::configFactory();
|
|
$config = $config_factory->getEditable('admin_toolbar.settings');
|
|
if (empty($config->get('menu_depth'))) {
|
|
$config->set('menu_depth', 4);
|
|
$config->save(TRUE);
|
|
}
|
|
}
|