You are here

resp_img.install in Responsive images and styles 7

Same filename and directory in other branches
  1. 8 resp_img.install
  2. 7.2 resp_img.install

File

resp_img.install
View source
<?php

/**
 * Implementation of hook_schema().
 */
function resp_img_schema() {
  $schema['resp_img_suffix'] = array(
    'description' => 'Defines responsive images suffix\'',
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'The internal identifier for a responsive images suffix',
        'no export' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'The name of the suffix.',
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'The label of the suffix.',
        'default' => '',
      ),
      'suffix' => array(
        'type' => 'varchar',
        'length' => 255,
        'description' => 'The suffix.',
        'not null' => TRUE,
        'default' => '',
      ),
      'breakpoint' => array(
        'type' => 'int',
        'description' => 'The breakpoint in pixels for this suffix',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
    'indexes' => array(
      'suffix' => array(
        'suffix',
      ),
    ),
    // CTools exportable object definition
    'export' => array(
      'key' => 'name',
      'key name' => 'suffix name',
      'primary key' => 'id',
      'identifier' => 'resp_img_suffix',
      'admin_title' => 'label',
      'default hook' => 'default_resp_img_suffixs',
      'api' => array(
        'owner' => 'resp_img',
        'api' => 'default_resp_img_suffixs',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
resp_img_schema Implementation of hook_schema().