diff sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.install @ 0:ff03f76ab3fe

initial version
author danieleb <danielebarchiesi@me.com>
date Wed, 21 Aug 2013 18:51:11 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.install	Wed Aug 21 18:51:11 2013 +0100
@@ -0,0 +1,82 @@
+<?php
+
+/**
+ * Schema for customizable access rulesets.
+ */
+function ctools_access_ruleset_schema() {
+  return ctools_access_ruleset_schema_1();
+}
+
+function ctools_access_ruleset_schema_1() {
+  $schema = array();
+
+  $schema['ctools_access_ruleset'] = array(
+    'description' => 'Contains exportable customized access rulesets.',
+    'export' => array(
+      'identifier' => 'ruleset',
+      'bulk export' => TRUE,
+      'primary key' => 'rsid',
+      'api' => array(
+        'owner' => 'ctools_access_ruleset',
+        'api' => 'ctools_rulesets',
+        'minimum_version' => 1,
+        'current_version' => 1,
+      ),
+    ),
+    'fields' => array(
+      'rsid' => array(
+        'type' => 'serial',
+        'description' => 'A database primary key to ensure uniqueness',
+        'not null' => TRUE,
+        'no export' => TRUE,
+      ),
+      'name' => array(
+        'type' => 'varchar',
+        'length' => '255',
+        'description' => 'Unique ID for this ruleset. Used to identify it programmatically.',
+      ),
+      'admin_title' => array(
+        'type' => 'varchar',
+        'length' => '255',
+        'description' => 'Administrative title for this ruleset.',
+      ),
+      'admin_description' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'description' => 'Administrative description for this ruleset.',
+        'object default' => '',
+      ),
+      'requiredcontexts' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'description' => 'Any required contexts for this ruleset.',
+        'serialize' => TRUE,
+        'object default' => array(),
+      ),
+      'contexts' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'description' => 'Any embedded contexts for this ruleset.',
+        'serialize' => TRUE,
+        'object default' => array(),
+      ),
+      'relationships' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'description' => 'Any relationships for this ruleset.',
+        'serialize' => TRUE,
+        'object default' => array(),
+      ),
+      'access' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'description' => 'The actual group of access plugins for this ruleset.',
+        'serialize' => TRUE,
+        'object default' => array(),
+      ),
+    ),
+    'primary key' => array('rsid'),
+  );
+
+  return $schema;
+}