Projet

Général

Profil

Paste
Télécharger (1,85 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / ctools / ctools_custom_content / ctools_custom_content.install @ e4c061ad

1
<?php
2

    
3
/**
4
 * Schema for CTools custom content.
5
 */
6
function ctools_custom_content_schema() {
7
  return ctools_custom_content_schema_1();
8
}
9

    
10
function ctools_custom_content_schema_1() {
11
  $schema = array();
12

    
13
  $schema['ctools_custom_content'] = array(
14
    'description' => 'Contains exportable customized content for this site.',
15
    'export' => array(
16
      'identifier' => 'content',
17
      'bulk export' => TRUE,
18
      'primary key' => 'cid',
19
      'api' => array(
20
        'owner' => 'ctools_custom_content',
21
        'api' => 'ctools_content',
22
        'minimum_version' => 1,
23
        'current_version' => 1,
24
      ),
25
      'create callback' => 'ctools_content_type_new',
26
    ),
27
    'fields' => array(
28
      'cid' => array(
29
        'type' => 'serial',
30
        'description' => 'A database primary key to ensure uniqueness',
31
        'not null' => TRUE,
32
        'no export' => TRUE,
33
      ),
34
      'name' => array(
35
        'type' => 'varchar',
36
        'length' => '255',
37
        'description' => 'Unique ID for this content. Used to identify it programmatically.',
38
      ),
39
      'admin_title' => array(
40
        'type' => 'varchar',
41
        'length' => '255',
42
        'description' => 'Administrative title for this content.',
43
      ),
44
      'admin_description' => array(
45
        'type' => 'text',
46
        'size' => 'big',
47
        'description' => 'Administrative description for this content.',
48
        'object default' => '',
49
      ),
50
      'category' => array(
51
        'type' => 'varchar',
52
        'length' => '255',
53
        'description' => 'Administrative category for this content.',
54
      ),
55
      'settings' => array(
56
        'type' => 'text',
57
        'size' => 'big',
58
        'description' => 'Serialized settings for the actual content to be used',
59
        'serialize' => TRUE,
60
        'object default' => array(),
61
      ),
62
    ),
63
    'primary key' => array('cid'),
64
  );
65

    
66
  return $schema;
67
}