Provides API functions specifically for managing stock records in Chado. The stock table of Chado is used for storing a variety of data types besides just stocks from a stock collection. Examples of other records commonly stored in the stock table are germplasm and individuals from a breeding population.
◆ chado_autocomplete_stock()
chado_autocomplete_stock |
( |
|
$string = '' | ) |
|
Used for autocomplete in forms for identifying stocks
- Parameters
-
$string | The string to search for. |
- Returns
- A json array of terms that begin with the provided string.
◆ chado_get_multiple_stocks()
chado_get_multiple_stocks |
( |
|
$identifiers, |
|
|
|
$options = [] |
|
) |
| |
Retrieves a chado stock variable.
- Parameters
-
$identifier | An array with the key stating what the identifier is. Supported keys include any field in the stock table. See the chado_select_record() $values parameter for additional details including an example. |
$options | An array of options. Supported keys include:
|
- Returns
- An array of stock objects matching the criteria.
◆ chado_get_stock()
chado_get_stock |
( |
|
$identifiers, |
|
|
|
$options = [] |
|
) |
| |
Retrieves a chado stock variable
- Parameters
-
$identifier | An array with the key stating what the identifier is. Supported keys (only one of the following unique keys is required):
- stock_id: the chado stock.stock_id primary key
- nid: the drupal nid of the stock There are also some specially handled keys. They are:
- property: An array/object describing the property to select records for. It should at least have either a type_name (if unique across cvs) or type_id. Other supported keys include: cv_id/cv_name (of the type), value and rank
|
$options | An array of options. Supported keys include:
|
NOTE: the $identifier parameter can really be any array similar to $values passed into chado_select_record(). It should fully specify the stock record to be returned.
- Returns
- If unique values were passed in as an identifier then an object describing the stock will be returned (will be a chado variable from chado_generate_var()). Otherwise, FALSE will be returned.