Mercurial > hg > rr-repo
comparison modules/rdf/rdf.install @ 0:ff03f76ab3fe
initial version
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Wed, 21 Aug 2013 18:51:11 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ff03f76ab3fe |
---|---|
1 <?php | |
2 | |
3 /** | |
4 * @file | |
5 * Install, update and uninstall functions for the rdf module. | |
6 */ | |
7 | |
8 /** | |
9 * Implements hook_schema(). | |
10 */ | |
11 function rdf_schema() { | |
12 $schema['rdf_mapping'] = array( | |
13 'description' => 'Stores custom RDF mappings for user defined content types or overriden module-defined mappings', | |
14 'fields' => array( | |
15 'type' => array( | |
16 'type' => 'varchar', | |
17 'length' => 128, | |
18 'not null' => TRUE, | |
19 'description' => 'The name of the entity type a mapping applies to (node, user, comment, etc.).', | |
20 ), | |
21 'bundle' => array( | |
22 'type' => 'varchar', | |
23 'length' => 128, | |
24 'not null' => TRUE, | |
25 'description' => 'The name of the bundle a mapping applies to.', | |
26 ), | |
27 'mapping' => array( | |
28 'description' => 'The serialized mapping of the bundle type and fields to RDF terms.', | |
29 'type' => 'blob', | |
30 'not null' => FALSE, | |
31 'size' => 'big', | |
32 'serialize' => TRUE, | |
33 ), | |
34 ), | |
35 'primary key' => array('type', 'bundle'), | |
36 ); | |
37 | |
38 return $schema; | |
39 } | |
40 | |
41 /** | |
42 * Implements hook_install(). | |
43 */ | |
44 function rdf_install() { | |
45 // Collect any RDF mappings that were declared by modules installed before | |
46 // this one. | |
47 $modules = module_implements('rdf_mapping'); | |
48 rdf_modules_installed($modules); | |
49 } |