You are here

dimension.install in Dimension 7

File

dimension.install
View source
<?php

/**
 * Implements hook_field_schema().
 */
function dimension_field_schema($field) {
  list($has_length, $has_more) = _dimension_get_modes($field['settings']['mode']);
  $columns = array();
  if ($has_length) {
    $columns['length'] = array(
      'type' => 'varchar',
      'length' => 10,
      'not null' => FALSE,
    );
  }
  if ($has_more) {
    $columns['width'] = array(
      'type' => 'varchar',
      'length' => 10,
      'not null' => FALSE,
    );
    $columns['height'] = array(
      'type' => 'varchar',
      'length' => 10,
      'not null' => FALSE,
    );
  }
  return array(
    'columns' => $columns,
    'indexes' => array(),
  );
}

Functions

Namesort descending Description
dimension_field_schema Implements hook_field_schema().