[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

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

   1  <?php
   2  // $Id: stylizer.install,v 1.1.2.2 2010/07/14 01:57:42 merlinofchaos Exp $
   3  
   4  /**
   5   * Schema for stylizer.
   6   */
   7  function stylizer_schema() {
   8    return stylizer_schema_1();
   9  }
  10  
  11  function stylizer_schema_1() {
  12    $schema = array();
  13  
  14    $schema['stylizer'] = array(
  15      'description' => 'Customized stylizer styles created by administrative users.',
  16      'export' => array(
  17        'bulk export' => TRUE,
  18        'export callback' => 'stylizer_style_export',
  19        'can disable' => TRUE,
  20        'identifier' => 'style',
  21        'primary key' => 'sid',
  22      ),
  23      'fields' => array(
  24        'sid' => array(
  25          'type' => 'serial',
  26          'not null' => TRUE,
  27          'no export' => TRUE,
  28        ),
  29        'name' => array(
  30          'type' => 'varchar',
  31          'length' => '255',
  32          'description' => 'Unique ID for this style. Used to identify it programmatically.',
  33        ),
  34        'admin_title' => array(
  35          'type' => 'varchar',
  36          'length' => '255',
  37          'description' => 'Human readable title for this style.',
  38        ),
  39        'admin_description' => array(
  40          'type' => 'text',
  41          'size' => 'big',
  42          'description' => 'Administrative description of this style.',
  43          'object default' => '',
  44        ),
  45        'settings' => array(
  46          'type' => 'text',
  47          'size' => 'big',
  48          'serialize' => TRUE,
  49          'object default' => array(),
  50          'initial ' => array(
  51            'name' => '_temporary',
  52            'style_base' => NULL,
  53            'palette' => array(),
  54          ),
  55          'description' => 'A serialized array of settings specific to the style base that describes this plugin.',
  56        ),
  57      ),
  58      'primary key' => array('sid'),
  59      'unique keys' => array(
  60        'name' => array('name'),
  61      ),
  62    );
  63  
  64    return $schema;
  65  }
  66  
  67  /**
  68   * Implementation of hook_install().
  69   */
  70  function stylizer_install() {
  71    $ret = array();
  72    if (db_table_exists('panels_style')) {
  73      db_rename_table($ret, 'panels_style', 'stylizer');
  74    }
  75    else {
  76      drupal_install_schema('stylizer');
  77    }
  78  }
  79  
  80  /**
  81   * Implementation of hook_uninstall().
  82   */
  83  function stylizer_uninstall() {
  84    drupal_uninstall_schema('stylizer');
  85  }


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