Tripal
|
Functions | |
chado_add_node_form_relationships (&$form, &$form_state, $details) | |
chado_add_node_form_relationships_add_button_validate ($form, &$form_state) | |
chado_add_node_form_relationships_add_button_submit ($form, &$form_state) | |
chado_add_node_form_relationships_remove_button_validate ($form, &$form_state) | |
chado_add_node_form_relationships_remove_button_submit (&$form, &$form_state) | |
chado_add_node_form_relationships_create_relationship_formstate_array ($form, &$form_state) | |
theme_chado_add_node_form_relationships_table ($variables) | |
chado_retrieve_node_form_relationships ($node) | |
chado_update_node_form_relationships ($node, $details, $retrieved_relationships=FALSE) | |
chado_add_node_form_relationships_name_to_id_callback ($base_table, $name_field, $string) | |
API to manage the chado _relationship table for various Tripal Node Types
How To Use:
chado_add_node_form_relationships_add_button_submit | ( | $form, | |
& | $form_state | ||
) |
Called by the add button in chado_add_node_form_relationships
Create an array of additional relationships in the form state. This array will then be used to rebuild the form in subsequent builds
chado_add_node_form_relationships_add_button_validate | ( | $form, | |
& | $form_state | ||
) |
Validate the user input for creating a new relationship. Called by the add button in chado_add_node_form_relationships.
chado_add_node_form_relationships_create_relationship_formstate_array | ( | $form, | |
& | $form_state | ||
) |
Creates an array in form_state containing the existing relationships. This array is then modified by the add/remove buttons and used as a source for rebuilding the form.
$form_state['chado_relationships'] = array( '[type_id]-[rank]' => array( 'object_id' => [the _relationship.object_id value], 'object_name' => [the base_table.uniquename value linked on base_foreign_key=object_id], 'subject_id' => [the _relationship.subject_id value], 'subject_name' => [the base_table.uniquename value linked on base_foreign_key=subject_id], 'type_id' => [the _relationship.type_id value], 'type_name' => [the cvterm.name value linked on type_id], 'rank' => [the _relationship.rank value], ), );
chado_add_node_form_relationships_name_to_id_callback | ( | $base_table, | |
$name_field, | |||
$string | |||
) |
Handles autocomplete for subject & object id
$string | The part of the string already typed in the textfield |
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
chado_add_node_form_relationships_remove_button_validate | ( | $form, | |
& | $form_state | ||
) |
Called by the many remove buttons in chado_add_node_form_relationships
theme_chado_add_node_form_relationships_table | ( | $variables | ) |
Function to theme the add/remove relationships form into a table