Tripal v1.0 (6.x-1.0)
|
Go to the source code of this file.
Functions | |
tripal_stock_admin () | |
tripal_stock_admin_validate ($form, &$form_state) | |
tripal_stock_sync_stocks ($organism_id, $job_id) | |
tripal_stock_sync_stock_set ($organism_id, $job_id) | |
get_tripal_stock_admin_form_cleanup_set (&$form) | |
tripal_stock_cleanup ($dummy=NULL, $job_id=NULL) |
Definition in file tripal_stock-administration.inc.
tripal_stock_sync_stocks | ( | $ | organism_id, |
$ | job_id | ||
) |
Sync stocks associated with a given organism or sync all stocks
Note: This is essentially an API function to make tripal stock sync act similar to other tripal modules
$organism_id | The ID of the organism to sync all stocks for |
$job_id | The ID of the tripal job |
Definition at line 187 of file tripal_stock-administration.inc.
{ if ($organism_id) { return tripal_stock_sync_stock_set($organism_id, $job_id); } else { //get a list of all organisms and sync all stocks for all organisms $organisms = tripal_core_chado_select('organism', array('organism_id','genus','species','common_name'), array()); foreach ($organisms as $o) { print "Syncing stocks associated with $o->genus $o->species ($o->common_name)\n"; tripal_stock_sync_stock_set($o->organism_id, $job_id); } } }