views_system.install in Views System 8
Same filename and directory in other branches
Install, update and uninstall functions for the views_system module.
File
views_system.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the views_system module.
*/
/**
* Implements hook_schema().
*/
function views_system_schema() {
$schema['views_system'] = array(
'description' => "A list of all modules, themes, and theme engines that are or have been installed in Drupal's file system.",
'fields' => array(
'filename' => array(
'description' => 'The path of the primary file for this item, relative to the Drupal root; e.g. modules/node/node.module.',
'type' => 'varchar_ascii',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'admin_theme' => array(
'description' => 'Boolean indicating whether or not this theme is the administration theme.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'base_theme' => array(
'description' => 'The base theme of this theme.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'bootstrap' => array(
'description' => "Boolean indicating whether this module is loaded during Drupal's early bootstrapping phase (e.g. even before the page cache is consulted).",
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'core' => array(
'description' => 'The version of Drupal that this item is for.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'datestamp' => array(
'description' => 'The release date of this item.',
'type' => 'int',
'not null' => FALSE,
'default' => NULL,
),
'default_theme' => array(
'description' => 'Boolean indicating whether or not this theme is the default theme.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'dependencies' => array(
'description' => 'A list of other modules that this module requires.',
'type' => 'blob',
'not null' => FALSE,
),
'description' => array(
'description' => 'The brief description of this item.',
'type' => 'blob',
'not null' => FALSE,
),
'engine' => array(
'description' => 'The engine of this theme.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'features' => array(
'description' => 'A list of available features of this theme.',
'type' => 'blob',
'not null' => FALSE,
),
'info' => array(
'description' => "A serialized array containing information from this item's .info file; keys can include name, description, package, version, core, dependencies, and php.",
'type' => 'blob',
'not null' => FALSE,
),
'label' => array(
'description' => 'The human readable name of this item.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'libraries' => array(
'description' => 'A list of libraries of this theme.',
'type' => 'blob',
'not null' => FALSE,
),
'mtime' => array(
'description' => 'The info file modification time of this item.',
'type' => 'int',
'not null' => FALSE,
'default' => NULL,
),
'name' => array(
'description' => 'The name of this item; e.g. node.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'origin' => array(
'description' => 'The origin of this item, either core or extension.',
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
),
'owner' => array(
'description' => "A theme's 'parent'. Can be either a theme or an engine.",
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'package' => array(
'description' => 'The name of the package this module belongs to.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'pathname' => array(
'description' => 'The relative path and filename of this item.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'php' => array(
'description' => 'The minimum PHP version that this item requires.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'project' => array(
'description' => 'The name of the project this item belongs to.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'project_status_url' => array(
'description' => 'The URL to check for updates for this custom item.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'regions' => array(
'description' => 'A list of regions of this theme.',
'type' => 'blob',
'not null' => FALSE,
),
'regions_hidden' => array(
'description' => 'A list of hidden regions of this theme.',
'type' => 'blob',
'not null' => FALSE,
),
'required' => array(
'description' => 'Boolean indicating whether or not this item is absolutely required.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'required_by' => array(
'description' => 'A full list of other items that depends on this item.',
'type' => 'blob',
'not null' => FALSE,
),
'requires' => array(
'description' => 'A full list of other items that this item requires.',
'type' => 'blob',
'not null' => FALSE,
),
'schema_version' => array(
'description' => "The module's database schema version number. -1 if the module is not installed (its tables do not exist); 0 or the largest N of the module's hook_update_N() function that has either been run or existed when the module was first installed.",
'type' => 'int',
'not null' => TRUE,
'default' => -1,
'size' => 'small',
),
'screenshot' => array(
'description' => 'The thumbnail image of this theme.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'status' => array(
'description' => 'Boolean indicating whether or not this item is enabled.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'type' => array(
'description' => 'The type of this item, either module, theme, or theme_engine.',
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
),
'version' => array(
'description' => 'The version of this item.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'visible' => array(
'description' => 'Boolean indicating whether or not this item is visible on the modules and themes page.',
'type' => 'int',
'not null' => TRUE,
'default' => 1,
),
'weight' => array(
'description' => "The order in which this module's hooks should be invoked relative to other modules. Equal-weighted modules are ordered by name.",
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'filename',
),
'indexes' => array(
'system_list' => array(
'status',
'bootstrap',
'type',
'weight',
'name',
),
'type_name' => array(
'type',
'name',
),
),
);
return $schema;
}
/**
* Implements hook_install().
*/
function views_system_install() {
views_system_rebuild_module_data();
views_system_rebuild_theme_data();
}
Functions
Name | Description |
---|---|
views_system_install | Implements hook_install(). |
views_system_schema | Implements hook_schema(). |