menu_link_weight.install in Menu Link Weight 8
Same filename and directory in other branches
Contains install and uninstall functions for the Menu Link Weight module.
File
menu_link_weight.installView source
<?php
/**
* @file
* Contains install and uninstall functions for the Menu Link Weight module.
*/
/**
* Implements hook_install().
*/
function menu_link_weight_install() {
// Set the module weight higher than Menu UI module so that
// menu_link_weight_form_node_form_alter() is called after
// menu_ui_form_node_form_alter().
module_set_weight('menu_link_weight', 10);
}
/**
* Add default settings for menu_parent_form_selector.
*/
function menu_link_weight_update_8100() {
\Drupal::configFactory()
->getEditable('menu_link_weight.settings')
->set('menu_parent_form_selector', 'default')
->save();
}
Functions
Name | Description |
---|---|
menu_link_weight_install | Implements hook_install(). |
menu_link_weight_update_8100 | Add default settings for menu_parent_form_selector. |