private.install in Private 7
Same filename and directory in other branches
Install, update and uninstall functions for the private module.
File
private.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the private module.
*/
/**
* Implements hook_schema().
*/
function private_schema() {
$schema['private'] = array(
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'private' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'nid',
),
);
return $schema;
}
/**
* Implements hook_uninstall().
*/
function private_uninstall() {
// Remove variables.
$node_types = array_keys(node_type_get_types());
foreach ($node_types as $node_type) {
variable_del('private_' . $node_type);
}
}
Functions
Name | Description |
---|---|
private_schema | Implements hook_schema(). |
private_uninstall | Implements hook_uninstall(). |