path_metatags.install in Path metatags 7
Provides database structure for PATH METATAGS module.
File
path_metatags.installView source
<?php
/**
* @file
* Provides database structure for PATH METATAGS module.
*/
/**
* Implements hook_uninstall().
*/
function path_metatags_uninstall() {
variable_del('path_metatags_skip_tags');
}
/**
* Implements hook_schema().
*/
function path_metatags_schema() {
$schema['path_metatags'] = array(
'description' => 'Stores path metatags.',
'export' => array(
'key' => 'machine_name',
'primary key' => 'path_id',
'identifier' => 'path_metatags',
'default hook' => 'path_metatags_settings_info',
'can disable' => FALSE,
'load callback' => 'path_metatags_load_by_name',
'load multiple callback' => 'path_metatags_load_by_name_multiple',
'load all callback' => 'path_metatags_load_all',
'export callback' => 'path_metatags_export',
'list callback' => 'path_metatags_export_list',
'api' => array(
'owner' => 'path_metatags',
'api' => 'path_metatags',
'minimum_version' => 1,
'current_version' => 1,
),
),
'fields' => array(
'path_id' => array(
'description' => t("Metatags's variant unique identifier"),
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'no export' => TRUE,
),
'machine_name' => array(
'description' => t("Metatags's variant machine name"),
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'name' => array(
'description' => t("Metatags's variant human-readable name"),
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'path' => array(
'description' => t('URL where metatags should be rendered'),
'type' => 'varchar',
'length' => 256,
'not null' => TRUE,
),
'data' => array(
'description' => t('Serialized data of metatags'),
'type' => 'blob',
'not null' => TRUE,
'size' => 'big',
'serialize' => TRUE,
'object default' => array(),
),
'weight' => array(
'description' => t('Metatag weight related to other metatags'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'path_id',
),
'unique keys' => array(
'machine_name' => array(
'machine_name',
),
),
);
return $schema;
}
Functions
Name | Description |
---|---|
path_metatags_schema | Implements hook_schema(). |
path_metatags_uninstall | Implements hook_uninstall(). |