toolbar.install 1.22 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

/**
 * @file
 * Install, update and uninstall functions for the toolbar module.
 */

/**
 * Implements hook_schema().
 */
function toolbar_schema() {
  $schema['cache_toolbar'] = drupal_get_schema_unprocessed('system', 'cache');
  $schema['cache_toolbar']['description'] = 'Cache table for the Toolbar module to store per-user hashes of rendered toolbar subtrees.';
  return $schema;
}

/**
18
 * @addtogroup updates-7.x-to-8.x
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 * @{
 */

/**
 * Creates the {cache_toolbar} cache table.
 */
function toolbar_update_8000() {
  $schema['cache_toolbar'] = drupal_get_schema_unprocessed('system', 'cache');
  $schema['cache_toolbar']['description'] = 'Cache table for the Toolbar module to store per-user hashes of rendered toolbar subtrees.';
  db_create_table('cache_toolbar', $schema['cache_toolbar']);
}

/**
 * Enable the Breakpoint and Config modules.
 *
 * The 7.x version of the Toolbar module had no dependencies. The 8.x version
 * depends on the Breakpoint and Configuration manager modules.
 */
function toolbar_update_8001() {
  // Enable the modules without re-installing the schema.
39
  update_module_enable(array('breakpoint'));
40
41
42
}

/**
43
 * @} End of "addtogroup updates-7.x-to-8.x".
44
45
 * The next series of updates should start at 9000.
 */