You are here

paragraphs_pack.install in Paragraphs pack 7

Install, update and uninstall functions for the paragraphs_pack module.

File

paragraphs_pack.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the paragraphs_pack module.
 */

/**
 * Implements hook_install().
 */
function paragraphs_pack_install() {
  field_info_cache_clear();
}

/**
 * Implements hook_field_schema().
 */
function paragraphs_pack_field_schema($field) {
  $columns = array();
  switch ($field['type']) {
    case PP_FIELD_TYPE_VIEW_MODE:
      $columns = array(
        'value' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
        ),
      );
      break;
  }
  return array(
    'columns' => $columns,
    'indexes' => array(
      'value' => array(
        'value',
      ),
    ),
  );
}

Functions