| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 | <?php/** * Implements hook_schema(). */function tripal_panes_schema() {  $schema = array();  $schema['tripal_panes'] = array(    'description' => 'The list of panes into which fields can be placed.',    'fields' => array(      'pane_id' => array(        'description' => 'The primary identifier for this table.',        'type' => 'serial',        'unsigned' => TRUE,        'not null' => TRUE,      ),      'bundle_id' => array(        'description' => 'A bundle ID from the tripal_bundle table.',        'type' => 'int',        'not null' => TRUE,      ),      'name' => array(        'description' => 'The computer readable name for the pane. This name must only have alphanumerical characters and underscores and must not begin with a number. ',        'type' => 'varchar',        'length' => 128,        'not null' => TRUE,        'default' => '',      ),      'label' => array(        'description' => 'A human readable name for pane. This name will be shown to users in the sidebar menu.',        'type' => 'varchar',        'length' => 128,        'not null' => TRUE,        'default' => '',      ),      'settings' => array(        'description' => 'Contains a serialized array tripal_panesof settings for the pane.',        'type' => 'text',        'not null' => FALSE,      ),      'weight' => array(        'type' => 'int',        'not null' => FALSE,        'default' => 0      ),    ),    'indexes' => array(      'bundle_id' => array('bundle_id'),    ),    'unique keys' => array(      'bundle_pane' => array('bundle_id', 'name'),    ),    'foreign keys' => array(      'tripal_bundle' => array(        'table' => 'tripal_bundle',        'columns' => array(          'bundle_id' => 'id',        ),      ),    ),    'primary key' => array('pane_id'),  );  $schema['tripal_pane_fields'] = array(    'description' => 'The list of panes into which fields can be placed.',    'fields' => array(      'pane_field_id' => array(        'description' => 'The primary identifier for this table.',        'type' => 'serial',        'unsigned' => TRUE,        'not null' => TRUE,      ),      'pane_id' => array(        'description' => 'The primary identifier for this table.',        'type' => 'int',        'not null' => TRUE,      ),      'field_id' => array(        'description' => 'A bundle ID from the tripal_bundle table.',        'type' => 'int',        'not null' => TRUE,      ),      'css_class' => array(        'description' => 'CSS classes assigned to this field. Class names are separated by a semi-colon',        'type' => 'text'      )    ),    'indexes' => array(      'pane_id' => array('pane_id'),      'field_id' => array('field_id'),    ),    'unique keys' => array(      'pane_field' => array('pane_id', 'field_id'),    ),    'foreign keys' => array(      'tripal_pane' => array(        'table' => 'tripal_pane',        'columns' => array(          'pane_id' => 'pane_id',        ),      ),      'field_config' => array(        'table' => 'field_config',        'columns' => array(          'field_id' => 'id',        ),      ),    ),    'primary key' => array('pane_field_id'),  );  return $schema;}/** * */function tripal_add_tripal_bundle_panes_table(){  $schema = array (    'table' => 'tripal_bundle_panes',    'fields' => array (      'pane_id' => array (        'type' => 'serial',        'not null' => TRUE      ),      'bundle_id' => array(        'type' => 'int',        'not null' => TRUE      ),      'name' => array (        'type' => 'varchar',        'length' => 128,        'not null' => TRUE      ),      'weight' => array (        'type' => 'int',        'not null' => TRUE      ),      'settings' => array(        'type' => 'text'      ),    ),    'primary key' => array (      0 => 'pane_id'    ),    'foreign keys' => array (      'tripal_bundle' => array (        'table' => 'tripal_bundle',        'columns' => array (          'bundle_id' => 'bundle_id'        ),      ),    ),    'unique keys' => array (      'tripal_bundle_panes_name' => array ('name'),    ),    'indexes' => array(      'tripal_bundle_panes_bundle_id' => array('bundle_id'),    ),  );  chado_create_custom_table('tripal_bundle_panes', $schema, TRUE);}function tripal_panes_update_7203() {  module_load_include('module', 'tripal_ws', 'tripal_ws');  tripal_ws_test();}/** * Implementation of hook_update_dependencies(). * * It specifies a list of other modules whose updates must be run prior to * this one.  It also ensures the the Tripal API is in scope for site * upgrades when tripal is disabled. */function tripal_panes_update_dependencies() {  // Make sure we have the full API loaded this will help during a  // site upgrade when the tripal_core module is disabled.  //module_load_include('module', 'tripal', 'tripal');  //tripal_import_api();print "HI!!!\n";  module_load_include('module', 'tripal_ws', 'tripal_ws');  $dependencies = array();  return $dependencies;}
 |