You are here

custom_pagers.install in Custom Pagers 7

Same filename and directory in other branches
  1. 5 custom_pagers.install
  2. 6 custom_pagers.install

Custom pagers install file.

File

custom_pagers.install
View source
<?php

/**
 * @file
 * Custom pagers install file.
 */

/**
 * Implements hook_schema()
 */
function custom_pagers_schema() {
  $schema['custom_pager'] = array(
    'description' => 'Stores data for previous/next pagers to be added to nodes.',
    'fields' => array(
      'pid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Unique identifier for the {custom_pager}.',
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The visible title of the {custom_pager}.',
      ),
      'list_php' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
        'description' => 'Raw PHP to populate this {custom_pager}.',
      ),
      'view' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The name of the view used for this {custom_pager}.',
      ),
      'args' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => "A serialized array of arguments for the {custom_pager}'s view.",
      ),
      'position' => array(
        'type' => 'varchar',
        'length' => 16,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The position where this {custom_pager} should be displayed.',
      ),
      'visibility_php' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
        'description' => 'Raw PHP to determine when the {custom_pager} should be displayed.',
      ),
      'node_type' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'A specific node type this {custom_pager} should be displayed with.',
      ),
      'reverse_list' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => 'A boolean flag indicating that this {custom_pager} should be displayed in reverse order.',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
custom_pagers_schema Implements hook_schema()