function custom_pagers_schema in Custom Pagers 7
Same name and namespace in other branches
- 6 custom_pagers.install \custom_pagers_schema()
Implements hook_schema()
File
- ./
custom_pagers.install, line 11 - Custom pagers install file.
Code
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;
}