|
| query ($query, $condition) |
|
| queryOrder ($query, $order) |
|
| getValueList ($options=[], $keyword=NULL) |
|
| instanceSettingsForm () |
|
| __construct ($field, $instance) |
|
| getFieldName () |
|
| getField () |
|
| getInstance () |
|
| getFieldTerm () |
|
| getFieldTermID () |
|
| webServicesData () |
|
| viewsData ($view_base_id) |
|
| validate ($entity_type, $entity, $langcode, $items, &$errors) |
|
| load ($entity) |
|
| elementInfo () |
|
| settingsForm ($has_data) |
|
| settingsFormValidate ($form, &$form_state) |
|
| settingsTheme ($element) |
|
| instanceSettingsFormValidate ($form, &$form_state) |
|
| createInstance () |
|
|
static | $default_label = 'Chado Field' |
|
static | $default_description = 'The generic base class for all Chado fields. Replace this text as appropriate for the child implementation.' |
|
static | $default_settings |
|
static | $default_instance_settings |
|
static | $download_formatters |
|
static | $module = 'tripal_chado' |
|
static | $default_label = 'Tripal Field' |
|
static | $default_description = 'The generic base class for all Tripal fields. Replace this text as appropriate for the child implementation.' |
|
static | $default_settings |
|
static | $default_instance_settings |
|
static | $download_formatters |
|
static | $default_widget = '' |
|
static | $default_formatter = '' |
|
static | $module = 'tripal' |
|
static | $no_ui = TRUE |
|
static | $no_data = FALSE |
|
|
| queryJoinOnce ($query, $table, $alias, $condition, $type='INNER') |
|
| _addWebServiceElement (&$searchable_keys, &$sortable_keys, $parent_term_name, $parent_term, $element_name, $element_details) |
|
| _addViewsDataElement (&$data, $view_base_id, $parent, $element_name, $element_details) |
|
|
static | info () |
|
| $field |
|
| $instance |
|
| $term |
|
◆ getValueList()
ChadoField::getValueList |
( |
|
$options = [] , |
|
|
|
$keyword = NULL |
|
) |
| |
Used to retrieve a distinct list of values already used for the current field instance.
- Parameters
-
$keyword | A string option used to filter the distinct list. This is used when creating an autocomplete. For all distinct values, set this to NULL. |
$options | An array where options for how to generate this list can be specified. Supported options include:
- limit: how many results to limit to (Default: 25)
- label_string: a string with tokens that should be used to generate the human-readable values in the returned list.
|
The following example shows you how to pull all the value list for a specific instance of a field.
$field_name = 'obi__organism';
$bundle_name = 'bio_data_17';
values for.
$field_info = field_info_field($field_name);
$instance_info = field_info_instance('TripalEntity', $field_name,
$bundle_name);
$instance =
new ChadoField($field_info, $instance_info);
field instance.
$values = $instance->getValueList();
Definition: ChadoField.inc:3
- Returns
- An array of values.
Reimplemented from TripalField.
◆ instanceSettingsForm()
ChadoField::instanceSettingsForm |
( |
| ) |
|
◆ query()
ChadoField::query |
( |
|
$query, |
|
|
|
$condition |
|
) |
| |
- See also
- TripalField::query()
In addition to the rules to follow for the TripalField::query function these should also be followed for the ChadoField::query implementation.
- When giving alias to joined tables be sure to use aliases that are unique to avoid conflicts with other fields.
- When joining with the base table its alias is 'base'.
- You may join to materialized views if need be to help speed queries.
Reimplemented from TripalField.
Reimplemented in uo__unit, taxrank__infraspecific_taxon, sio__vocabulary, sio__annotation, sep__protocol, schema__alternate_name, schema__additional_type, sbo__relationship, sbo__database_cross_reference, operation__analysis, ogi__location_on_map, obi__organism, local__source_data, local__contact, efo__array_design, data__sequence_coordinates, data__accession, chado_linker__prop, and chado_linker__contact.
◆ queryJoinOnce()
ChadoField::queryJoinOnce |
( |
|
$query, |
|
|
|
$table, |
|
|
|
$alias, |
|
|
|
$condition, |
|
|
|
$type = 'INNER' |
|
) |
| |
|
protected |
A convient way to join a table to a query without duplicates.
- Parameters
-
$query | The SelectQuery object. |
$table | The table to join. |
$alias | The table alias to use. |
$condition | The join condition. |
$type | The type of join: INNER, LEFT OUTER, or RIGHT OUTER. |
◆ queryOrder()
ChadoField::queryOrder |
( |
|
$query, |
|
|
|
$order |
|
) |
| |
- See also
- TripalField::queryOrder()
Reimplemented from TripalField.
Reimplemented in uo__unit, taxrank__infraspecific_taxon, sio__vocabulary, sio__annotation, sep__protocol, schema__alternate_name, schema__additional_type, sbo__relationship, sbo__database_cross_reference, operation__analysis, ogi__location_on_map, obi__organism, local__source_data, local__contact, efo__array_design, data__sequence_coordinates, data__accession, chado_linker__prop, and chado_linker__contact.
◆ $default_instance_settings
ChadoField::$default_instance_settings |
|
static |
Initial value:= [
'term_vocabulary' => 'schema',
'term_name' => 'Thing',
'term_accession' => 'Thing',
'term_fixed' => FALSE,
'chado_table' => '',
'chado_column' => '',
'base_table' => '',
]
◆ $default_settings
ChadoField::$default_settings |
|
static |
Initial value:= [
'storage' => 'field_chado_storage',
]
◆ $download_formatters
ChadoField::$download_formatters |
|
static |
Initial value:= [
'TripalTabDownloader',
'TripalCSVDownloader',
]
The documentation for this class was generated from the following file:
- tripal_chado/includes/TripalFields/ChadoField.inc