viewreference.install in View reference 6
Same filename and directory in other branches
File
viewreference.installView source
<?php
/**
* Implementation of hook_install().
*/
function viewreference_install() {
drupal_install_schema('viewreference');
content_notify('install', 'viewreference');
}
/**
* Implementation of hook_uninstall().
*/
function viewreference_uninstall() {
drupal_uninstall_schema('viewreference');
content_notify('uninstall', 'viewreference');
}
/**
* Implementation of hook_enable().
*
* Notify content module when this module is enabled.
*/
function viewreference_enable() {
content_notify('enable', 'viewreference');
}
/**
* Implementation of hook_disable().
*
* Notify content module when this module is disabled.
*/
function viewreference_disable() {
content_notify('disable', 'viewreference');
}
/**
* Implementation of hook_schema().
*
* Create a table of views we can easily query. Views.module does not provide this, wtf!
*/
function viewreference_schema() {
$schema['viewreference'] = array(
'fields' => array(
'view_id' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'name' => array(
'type' => 'varchar',
'length' => '32',
'default' => '',
'not null' => TRUE,
),
'position' => array(
'type' => 'varchar',
'length' => '64',
'default' => '',
'not null' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array(
'view_id',
),
);
return $schema;
}
Functions
Name![]() |
Description |
---|---|
viewreference_disable | Implementation of hook_disable(). |
viewreference_enable | Implementation of hook_enable(). |
viewreference_install | Implementation of hook_install(). |
viewreference_schema | Implementation of hook_schema(). |
viewreference_uninstall | Implementation of hook_uninstall(). |