typekit_api.install in @font-your-face 6
Same filename and directory in other branches
Adds typekit tables for caching API data.
File
modules/typekit_api/typekit_api.installView source
<?php
/**
* @file
* Adds typekit tables for caching API data.
*/
/**
* Implements hook_install().
*/
function typekit_api_install() {
drupal_install_schema('typekit_api');
}
// typekit_api_install
/**
* Implements hook_uninstall().
*/
function typekit_api_uninstall() {
drupal_uninstall_schema('typekit_api');
variable_del('typekit_api_last_update');
}
// typekit_api_uninstall
/**
* Implements hook_schema.
*/
function typekit_api_schema() {
$schema = array();
$schema['typekit_api_variant'] = array(
'description' => 'Stores Typekit variant information.',
'fields' => array(
'vid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Primary Key: Unique variant ID.',
),
'typekit_id' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The font variant ID on Typekit.',
),
'name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The font variant name.',
),
'css_name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The CSS font-family.',
),
'style' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The CSS font-style.',
),
'variant' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The CSS font-variant.',
),
'weight' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The CSS font-weight.',
),
'foundry' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The font foundry name.',
),
'family' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The family name.',
),
'kit' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The kit ID on Typekit.',
),
),
'primary key' => array(
'vid',
),
);
return $schema;
}
// typekit_api_schema
Functions
Name | Description |
---|---|
typekit_api_install | Implements hook_install(). |
typekit_api_schema | Implements hook_schema. |
typekit_api_uninstall | Implements hook_uninstall(). |