|
@@ -189,6 +189,15 @@ function chado_organism_insert($node) {
|
|
|
'foreignkey_value' => $organism_id // the value of the example_id key
|
|
|
);
|
|
|
chado_node_properties_form_update_properties($node, $details);
|
|
|
+
|
|
|
+ // * Additional DBxrefs Form *
|
|
|
+ $details = array(
|
|
|
+ 'linking_table' => 'organism_dbxref', // the name of your _dbxref table
|
|
|
+ 'foreignkey_name' => 'organism_id', // the name of the key in your base table
|
|
|
+ 'foreignkey_value' => $organism_id // the value of the organism_id key
|
|
|
+ );
|
|
|
+ chado_node_additional_dbxrefs_form_update_dbxrefs($node, $details);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
@@ -251,6 +260,14 @@ function chado_organism_update($node) {
|
|
|
'foreignkey_value' => $organism_id // the value of the example_id key
|
|
|
);
|
|
|
chado_node_properties_form_update_properties($node, $details);
|
|
|
+
|
|
|
+ // * Additional DBxrefs Form *
|
|
|
+ $details = array(
|
|
|
+ 'linking_table' => 'organism_dbxref', // the name of your _dbxref table
|
|
|
+ 'foreignkey_name' => 'organism_id', // the name of the key in your base table
|
|
|
+ 'foreignkey_value' => $organism_id // the value of the organism_id key
|
|
|
+ );
|
|
|
+ chado_node_additional_dbxrefs_form_update_dbxrefs($node, $details);
|
|
|
}
|
|
|
/**
|
|
|
* Delete organism from both drupal and chado databases. Check dependency before
|
|
@@ -417,6 +434,16 @@ function chado_organism_form($node, $form_state) {
|
|
|
// Adds the form elements to your current form
|
|
|
chado_node_properties_form($form, $form_state, $details);
|
|
|
|
|
|
+ // ADDITIONAL DBXREFS FORM
|
|
|
+ //---------------------------------------------
|
|
|
+ $details = array(
|
|
|
+ 'linking_table' => 'organism_dbxref', // the name of the _dbxref table
|
|
|
+ 'base_foreign_key' => 'organism_id', // the name of the key in your base chado table
|
|
|
+ 'base_key_value' => $organism_id // the value of organism_id for this record
|
|
|
+ );
|
|
|
+ // Adds the form elements to your current form
|
|
|
+ chado_node_additional_dbxrefs_form($form, $form_state, $details);
|
|
|
+
|
|
|
return $form;
|
|
|
}
|
|
|
|