function chado_add_node_form_relationships_remove_button_submit

2.x chado_add_node_form_relationships_remove_button_submit(&$form, &$form_state)

Remove the correct relationship from the form Called by the many remove buttons in chado_add_node_form_relationships

Related topics

1 call to chado_add_node_form_relationships_remove_button_submit()
chado_add_node_form_subtables_remove_button_submit in tripal_core/api/
Remove subtable entries to the node forms. Supported subtables: Properties, Relationships, Additional DBxrefs.


tripal_core/api/, line 800
API to manage the chado _relationship table for various Tripal Node Types


function chado_add_node_form_relationships_remove_button_submit(&$form, &$form_state) {

  // if the chado_relationships array is not set then this is the first time modifying the
  // relationship table. this means we need to include all the relationships from the db
  chado_add_node_form_relationships_create_relationship_formstate_array($form, $form_state);

  // remove the specified relationship from the form relationship table
  if (preg_match('/relationships_remove-([^-]+-[^-]+)/', $form_state['triggering_element']['#name'], $match)) {
    $key = $match[1];
    if (array_key_exists($key, $form_state['chado_relationships'])) {