Projet

Général

Profil

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

root / drupal7 / sites / all / modules / ctools / ctools_custom_content / ctools_custom_content.install @ 6e3ce7c2

1
<?php
2

    
3
/**
4
 * @file
5
 */
6

    
7
/**
8
 * Schema for CTools custom content.
9
 */
10
function ctools_custom_content_schema() {
11
  return ctools_custom_content_schema_1();
12
}
13

    
14
function ctools_custom_content_schema_1() {
15
  $schema = array();
16

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

    
70
  return $schema;
71
}