t('Table that contains the Tripal Pane fieldsets.'), 'fields' => array( 'id' => array( 'type' => 'serial', 'not null' => TRUE, 'description' => 'The primary identifier for a group', 'no export' => TRUE, ), 'tripal_ds_field_label' => array( 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', 'description' => 'The label of this Tripal Pane.', ), 'tripal_ds_field_name' => array( 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', 'description' => 'The name of this Tripal Pane.', ), 'bundle' => array( 'type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '' ), 'weight' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 1, ), ), 'primary key' => array('id'), ); return $schema; } /** * Implements hook_disable(). */ function tripal_ds_disable(){ //Check if any tripal panes currently exist. //Grab all the bundles to cycle through them. $entities_with_tripal_panes = array(); $bundles = db_select('tripal_bundle', 'tb') ->fields('tb') ->execute() ->fetchAll(); foreach($bundles as $bundles => $bundle){ $field_groups = field_group_info_groups('TripalEntity', $bundle->name); foreach($field_groups['default'] as $field_names => $field_name){ if($field_name->format_type == 'tripalpane'){ array_push($entities_with_tripal_panes, $bundle->label); continue 2; } } } $output = 'You have disabled the Tripal DS module but Tripal Panes were found in the following Content Types: '; $output .= '