views_navigation.install in Views navigation 7
Views navigation (un-)install functions.
File
views_navigation.installView source
<?php
/**
* @file
* Views navigation (un-)install functions.
*/
/**
* Implements hook_disable().
*/
function views_navigation_disable() {
drupal_flush_all_caches();
}
/**
* Implements hook_schema().
*/
function views_navigation_schema() {
$schema = array();
$schema['cache_views_navigation'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['cache_views_navigation']['description'] = 'Cache views for views navigation.';
return $schema;
}
/**
* Add a cache table.
*/
function views_navigation_update_7101(&$sandbox) {
$cache = array(
'description' => 'Cache views for views navigation.',
'fields' => array(
'cid' => array(
'description' => 'Primary Key: Unique cache ID.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'data' => array(
'description' => 'A collection of data to cache.',
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
),
'expire' => array(
'description' => 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'created' => array(
'description' => 'A Unix timestamp indicating when the cache entry was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'serialized' => array(
'description' => 'A flag to indicate whether content is serialized (1) or not (0).',
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'expire' => array(
'expire',
),
),
'primary key' => array(
'cid',
),
);
db_create_table('cache_views_navigation', $cache);
}
Functions
Name | Description |
---|---|
views_navigation_disable | Implements hook_disable(). |
views_navigation_schema | Implements hook_schema(). |
views_navigation_update_7101 | Add a cache table. |