[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/ctools/ctools_custom_content/ -> ctools_custom_content.install (source)

   1  <?php
   2  // $Id: ctools_custom_content.install,v 1.1.2.1 2010/07/14 01:57:42 merlinofchaos Exp $
   3  
   4  /**
   5   * Schema for CTools custom content.
   6   */
   7  function ctools_custom_content_schema() {
   8    return ctools_custom_content_schema_1();
   9  }
  10  
  11  function ctools_custom_content_schema_1() {
  12    $schema = array();
  13  
  14    $schema['ctools_custom_content'] = array(
  15      'description' => 'Contains exportable customized content for this site.',
  16      'export' => array(
  17        'identifier' => 'content',
  18        'bulk export' => TRUE,
  19        'primary key' => 'cid',
  20        'api' => array(
  21          'owner' => 'ctools',
  22          'api' => 'ctools_content',
  23          'minimum_version' => 1,
  24          'current_version' => 1,
  25        ),
  26        'create callback' => 'ctools_content_type_new',
  27      ),
  28      'fields' => array(
  29        'cid' => array(
  30          'type' => 'serial',
  31          'description' => 'A database primary key to ensure uniqueness',
  32          'not null' => TRUE,
  33          'no export' => TRUE,
  34        ),
  35        'name' => array(
  36          'type' => 'varchar',
  37          'length' => '255',
  38          'description' => 'Unique ID for this content. Used to identify it programmatically.',
  39        ),
  40        'admin_title' => array(
  41          'type' => 'varchar',
  42          'length' => '255',
  43          'description' => 'Administrative title for this content.',
  44        ),
  45        'admin_description' => array(
  46          'type' => 'text',
  47          'size' => 'big',
  48          'description' => 'Administrative description for this content.',
  49          'object default' => '',
  50        ),
  51        'category' => array(
  52          'type' => 'varchar',
  53          'length' => '255',
  54          'description' => 'Administrative category for this content.',
  55        ),
  56        'settings' => array(
  57          'type' => 'text',
  58          'size' => 'big',
  59          'description' => 'Serialized settings for the actual content to be used',
  60          'serialize' => TRUE,
  61          'object default' => array(),
  62        ),
  63      ),
  64      'primary key' => array('cid'),
  65    );
  66  
  67    return $schema;
  68  }
  69  
  70  /**
  71   * Implementation of hook_install().
  72   */
  73  function ctools_custom_content_install() {
  74    if (!db_table_exists('ctools_custom_content')) {
  75      drupal_install_schema('ctools_custom_content');
  76    }
  77  }
  78  
  79  /**
  80   * Implementation of hook_uninstall().
  81   */
  82  function ctools_custom_content_uninstall() {
  83    drupal_uninstall_schema('ctools_custom_content');
  84  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7