Tripal
|
Functions | |
tripal_chado_pub_search_admin_form ($form, &$form_state) | |
tripal_chado_pub_search_admin_form_submit ($form, &$form_state) | |
tripal_chado_pub_search_page () | |
tripal_chado_pub_search_form ($form, &$form_state) | |
tripal_chado_pub_search_form_ajax_button_submit () | |
tripal_chado_pub_search_form_ajax_button_validate () | |
tripal_chado_pub_search_form_validate ($form, &$form_state) | |
tripal_chado_pub_search_form_submit ($form, &$form_state) | |
tripal_pubs_search_form_ajax_update ($form, $form_state) | |
theme_tripal_chado_pub_search_setup_form_elements ($variables) | |
tripal_search_publications ($search_array, $offset, $limit, &$total_records) | |
Functions responsible for creating the publication search form that allows a user of the site to search for publications that are currently in Chado.
theme_tripal_chado_pub_search_setup_form_elements | ( | $variables | ) |
Theme the tripal_chado_pub_search_setup_form form
tripal_chado_pub_search_form | ( | $form, | |
& | $form_state | ||
) |
Provides the form to search pubmed
tripal_chado_pub_search_form_ajax_button_submit | ( | ) |
This function is used to rebuild the form if an ajax call is made vai a button. The button causes the form to be submitted. We don't want this so we override the validate and submit routines on the form button. Therefore, this function only needs to tell Drupal to rebuild the form
tripal_chado_pub_search_form_ajax_button_validate | ( | ) |
This function is just a dummy to override the default form submit on ajax calls for buttons
tripal_chado_pub_search_form_submit | ( | $form, | |
& | $form_state | ||
) |
Submit the tripal_chado_pub_search_form form
tripal_chado_pub_search_form_validate | ( | $form, | |
& | $form_state | ||
) |
Validate the tripal_chado_pub_search_form form
tripal_chado_pub_search_page | ( | ) |
The page that contains the publication search form and the results for the search
tripal_pubs_search_form_ajax_update | ( | $form, | |
$form_state | |||
) |
Ajax callback to update the form
$form | The form array |
$form_state | The form state array |
tripal_search_publications | ( | $search_array, | |
$offset, | |||
$limit, | |||
& | $total_records | ||
) |
Builds the SQL statement need to search Chado for the publications that match the user supplied criteria. Tpyically, this function is called by the search form generated by the tripal_chado_pub_search_form() function but this function is included in the API for calling by anyone.
$search_array | An array of search criteria provided by the user. The search array is an associative array with the following keys: 'num_criteria': an integer indicating the number of search criteria supplied 'from_year': filters records by a start year 'to_year': filters records by an end year 'criteria': an array of criteria. Each criteria is an associative array with the following keys: 'search_terms': The text used for searching 'scope': The cvterm_id of the property used for filtering 'mode': The operation (e.g. AND, OR or NOT) |
$offset | The offset for paging records. The first record returned will be at the offset indicated here, and the next $limit number of records will be returned. |
$limit | The number of records to retrieve |
total_records | A value passed by reference. This value will get set to the total number of matching records |