| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Implementation of hook_schema(). 5 */ 6 function filter_schema() { 7 $schema['filters'] = array( 8 'description' => 'Table that maps filters (HTML corrector) to input formats (Filtered HTML).', 9 'fields' => array( 10 'fid' => array( 11 'type' => 'serial', 12 'not null' => TRUE, 13 'description' => 'Primary Key: Auto-incrementing filter ID.', 14 ), 15 'format' => array( 16 'type' => 'int', 17 'not null' => TRUE, 18 'default' => 0, 19 'description' => 'Foreign key: The {filter_formats}.format to which this filter is assigned.', 20 ), 21 'module' => array( 22 'type' => 'varchar', 23 'length' => 64, 24 'not null' => TRUE, 25 'default' => '', 26 'description' => 'The origin module of the filter.', 27 ), 28 'delta' => array( 29 'type' => 'int', 30 'not null' => TRUE, 31 'default' => 0, 32 'size' => 'tiny', 33 'description' => 'ID to identify which filter within module is being referenced.', 34 ), 35 'weight' => array( 36 'type' => 'int', 37 'not null' => TRUE, 38 'default' => 0, 39 'size' => 'tiny', 40 'description' => 'Weight of filter within format.', 41 ) 42 ), 43 'primary key' => array('fid'), 44 'unique keys' => array( 45 'fmd' => array('format', 'module', 'delta'), 46 ), 47 'indexes' => array( 48 'list' => array('format', 'weight', 'module', 'delta'), 49 ), 50 ); 51 $schema['filter_formats'] = array( 52 'description' => 'Stores input formats: custom groupings of filters, such as Filtered HTML.', 53 'fields' => array( 54 'format' => array( 55 'type' => 'serial', 56 'not null' => TRUE, 57 'description' => 'Primary Key: Unique ID for format.', 58 ), 59 'name' => array( 60 'type' => 'varchar', 61 'length' => 255, 62 'not null' => TRUE, 63 'default' => '', 64 'description' => 'Name of the input format (Filtered HTML).', 65 ), 66 'roles' => array( 67 'type' => 'varchar', 68 'length' => 255, 69 'not null' => TRUE, 70 'default' => '', 71 'description' => 'A comma-separated string of roles; references {role}.rid.', // This is bad since you can't use joins, nor index. 72 ), 73 'cache' => array( 74 'type' => 'int', 75 'not null' => TRUE, 76 'default' => 0, 77 'size' => 'tiny', 78 'description' => 'Flag to indicate whether format is cachable. (1 = cachable, 0 = not cachable)', 79 ), 80 ), 81 'primary key' => array('format'), 82 'unique keys' => array('name' => array('name')), 83 ); 84 85 $schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache'); 86 $schema['cache_filter']['description'] = 'Cache table for the Filter module to store already filtered pieces of text, identified by input format and md5 hash of the text.'; 87 88 return $schema; 89 } 90
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |