drupal/core/modules/toolbar/toolbar.install

47 lines
1.3 KiB
Plaintext

<?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;
}
/**
* @defgroup updates-7.x-to-8.x Updates from 7.x to 8.x
* @{
* Update functions from 7.x to 8.x.
*/
/**
* 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.
update_module_enable(array('breakpoint', 'config'));
}
/**
* @} End of "defgroup updates-7.x-to-8.x".
* The next series of updates should start at 9000.
*/