You are here

private.install in Private 7

Same filename and directory in other branches
  1. 5 private.install
  2. 6 private.install
  3. 7.2 private.install

Install, update and uninstall functions for the private module.

File

private.install
View 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

Namesort descending Description
private_schema Implements hook_schema().
private_uninstall Implements hook_uninstall().