You are here

og_menu.install in Organic Groups Menu (OG Menu) 7.2

File

og_menu.install
View source
<?php

/**
 * Implementation of hook_schema()
 */
function og_menu_schema() {
  $schema['og_menu'] = array(
    'fields' => array(
      'gid' => array(
        'type' => 'int',
        'not null' => TRUE,
      ),
      'menu_name' => array(
        'type' => 'varchar',
        'length' => 128,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'gid',
      'menu_name',
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_uninstall.
 *
 * Deletes og_menu variables.
 * (todo: Deletes menus that were created through og_menu)
 */
function og_menu_uninstall() {
  $vars = array(
    'og_menu_assignment',
    'og_menu_block_links',
    'og_menu_max_menus_per_group',
    'og_menu_show_blocks',
    'og_menu_show_homebox',
    'og_menu_show_menuposition',
    'og_menu_show_nodetype',
  );
  foreach ($vars as $var) {
    variable_del($var);
  }

  // @todo Delete Table og_menu
  // @todo Decide whether we want to delete all menu's created by og_menu.
}

/**
 * Clear menu cache to ensure changes in hook_menu().
 */
function og_menu_update_7201(&$sandbox) {

  // No need to clear menu cache her, because all caches will be cleared anyway
  // while finishing update process in update_finished().
}

Functions

Namesort descending Description
og_menu_schema Implementation of hook_schema()
og_menu_uninstall Implementation of hook_uninstall.
og_menu_update_7201 Clear menu cache to ensure changes in hook_menu().