auto_menutitle.install in Auto Menu Title 8
Same filename and directory in other branches
Install, update and uninstall functions for the auto_menutitle module.
File
auto_menutitle.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the auto_menutitle module.
*/
/**
* Implements hook_install().
*/
function auto_menutitle_install() {
// Set this module's weight to one higher than that of the menu_ui module.
$weight = \Drupal::config('core.extension')
->get("module.menu_ui");
module_set_weight('auto_menutitle', $weight + 1);
}
/**
* Implements hook_uninstall().
*/
function auto_menutitle_uninstall() {
// Delete variables.
$node_types = array_keys(node_type_get_types());
foreach ($node_types as $node_type) {
\Drupal::state()
->delete('auto_menutitle_' . $node_type);
}
}
Functions
Name![]() |
Description |
---|---|
auto_menutitle_install | Implements hook_install(). |
auto_menutitle_uninstall | Implements hook_uninstall(). |