| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 | <?php/** * @file * Installation routines for page manager module. *//** * Implements hook_schema(). */function page_manager_schema() {  // This should always point to our 'current' schema. This makes it relatively easy  // to keep a record of schema as we make changes to it.  return page_manager_schema_1();}/** * Schema version 1 for Panels in D6. */function page_manager_schema_1() {  $schema['page_manager_handlers'] = array(    'export' => array(      'identifier' => 'handler',      'bulk export' => TRUE,      'export callback' => 'page_manager_export_task_handler',      'load callback' => 'page_manager_export_task_handler_load',      'delete callback' => 'page_manager_delete_task_handler',      'primary key' => 'did',      'api' => array(        'owner' => 'page_manager',        'api' => 'pages_default',        'minimum_version' => 1,        'current_version' => 1,      ),    ),    'fields' => array(      'did' => array(        'type' => 'serial',        'not null' => TRUE,        'description' => 'Primary ID field for the table. Not used for anything except internal lookups.',        'no export' => TRUE,      ),      'name' => array(        'type' => 'varchar',        'length' => '255',        'description' => 'Unique ID for this task handler. Used to identify it programmatically.',      ),      'task' => array(        'type' => 'varchar',        'length' => '64',        'description' => 'ID of the task this handler is for.',      ),      'subtask' => array(        'type' => 'varchar',        'length' => '64',        'description' => 'ID of the subtask this handler is for.',        'not null' => TRUE,        'default' => '',      ),      'handler' => array(        'type' => 'varchar',        'length' => '64',        'description' => 'ID of the task handler being used.',      ),      'weight' => array(        'type' => 'int',        'description' => 'The order in which this handler appears. Lower numbers go first.',      ),      'conf' => array(        'type' => 'text',        'size' => 'big',        'description' => 'Serialized configuration of the handler, if needed.',        'not null' => TRUE,        'serialize' => TRUE,        'object default' => array(),      ),    ),    'primary key' => array('did'),    'unique keys' => array(      'name' => array('name'),    ),    'indexes' => array('fulltask' => array('task', 'subtask', 'weight')),  );  $schema['page_manager_weights'] = array(    'description' => 'Contains override weights for page_manager handlers that are in code.',    'fields' => array(      'name' => array(        'type' => 'varchar',        'length' => '255',        'description' => 'Unique ID for this task handler. Used to identify it programmatically.',        'not null' => TRUE,        'default' => '',      ),      'weight' => array(        'type' => 'int',        'description' => 'The order in which this handler appears. Lower numbers go first.',      ),    ),    'primary key' => array('name'),    'indexes' => array(      'weights' => array('name', 'weight'),    ),  );  $schema['page_manager_pages'] = array(    'description' => 'Contains page subtasks for implementing pages with arbitrary tasks.',    'export' => array(      'identifier' => 'page',      'bulk export' => TRUE,      'export callback' => 'page_manager_page_export',      'api' => array(        'owner' => 'page_manager',        'api' => 'pages_default',        'minimum_version' => 1,        'current_version' => 1,      ),    ),    'fields' => array(      'pid' => array(        'type' => 'serial',        'not null' => TRUE,        'description' => 'Primary ID field for the table. Not used for anything except internal lookups.',        'no export' => TRUE,      ),      'name' => array(        'type' => 'varchar',        'length' => '255',        'description' => 'Unique ID for this subtask. Used to identify it programmatically.',      ),      'task' => array(        'type' => 'varchar',        'length' => '64',        'description' => 'What type of page this is, so that we can use the same mechanism for creating tighter UIs for targeted pages.',        'default' => 'page',      ),      'admin_title' => array(        'type' => 'varchar',        'length' => '255',        'description' => 'Human readable title for this page subtask.',      ),      'admin_description' => array(        'type' => 'text',        'size' => 'big',        'description' => 'Administrative description of this item.',        'object default' => '',      ),      'path' => array(        'type' => 'varchar',        'length' => '255',        'description' => 'The menu path that will invoke this task.',      ),      'access' => array(        'type' => 'text',        'size' => 'big',        'description' => 'Access configuration for this path.',        'not null' => TRUE,        'serialize' => TRUE,        'object default' => array(),      ),      'menu' => array(        'type' => 'text',        'size' => 'big',        'description' => 'Serialized configuration of Drupal menu visibility settings for this item.',        'not null' => TRUE,        'serialize' => TRUE,        'object default' => array(),      ),      'arguments' => array(        'type' => 'text',        'size' => 'big',        'description' => 'Configuration of arguments for this menu item.',        'not null' => TRUE,        'serialize' => TRUE,        'object default' => array(),      ),      'conf' => array(        'type' => 'text',        'size' => 'big',        'description' => 'Serialized configuration of the page, if needed.',        'not null' => TRUE,        'serialize' => TRUE,        'object default' => array(),      ),    ),    'primary key' => array('pid'),    'unique keys' => array(      'name' => array('name'),    ),    'indexes' => array('task' => array('task')),  );  return $schema;}/** * Implements hook_install(). */function page_manager_install() {  db_update('system')    ->fields(array('weight' => 99))    ->condition('name', 'page_manager')    ->execute();}
 |