You are here

menu_force.install in Menu Force 8

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

Installation functions for Menu Force module.

File

menu_force.install
View source
<?php

/**
 * @file
 * Installation functions for Menu Force module.
 */
use Drupal\Core\Database\Database;

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

  // Set the weight of the menu_force.module to 1
  // so it is loaded after the menu_ui.module.
  module_set_weight('menu_force', 1);

  // Empty table.
  $database = Database::getConnection();
  if ($database
    ->schema()
    ->tableExists('cache_container')) {
    $database
      ->truncate('cache_container')
      ->execute();
  }
}

Functions

Namesort descending Description
menu_force_install Implements hook_install().