You are here

content_menu.install in Content Menu 8

Same filename and directory in other branches
  1. 7 content_menu.install

File

content_menu.install
View source
<?php

/**
 * Implements hook_install().
 *
 */
function content_menu_install() {

  // Set weight to come after core menu.module.
  // Make sure this module's hooks' weight is set to be executed after the core.
  // Menu.module's hooks, so the node add/edit form is already altered by the
  // Menu.module befor content_menu does its form alterations.
  $weight = config('system.module')
    ->get('enabled.menu');
  module_set_weight('content_menu', $weight + 1);
}

/**
 * Moves Content menu settings from variables to config.
 *
 * @ingroup config_upgrade
 */
function content_menu_update_8000() {
  update_variables_to_config('content_menu.settings', array(
    'content_menu_add_existing_content_url' => 'add_existing_content_url',
    'content_menu_add_existing_content_view' => 'add_existing_content_view',
    'content_menu_alter_all_menus' => 'alter_all_menus',
    'content_menu_default_add_operation' => 'default_add_operation',
    'content_menu_special_menus' => 'special_menus',
  ));
}

Functions

Namesort descending Description
content_menu_install Implements hook_install().
content_menu_update_8000 Moves Content menu settings from variables to config.