Public Member Functions | |
query ($use_groupby=FALSE) | |
post_execute (&$values) | |
render_field ($entity, $field_name, $row_id) | |
render ($values) | |
options_form (&$form, &$form_state) | |
option_definition () | |
Views Field Handler for chado fields. Uses the same approach as the field api views_handler_field_field.
chado_views_handler_field::option_definition | ( | ) |
Define the options we are going to provide.
chado_views_handler_field::options_form | ( | & | $form, |
& | $form_state | ||
) |
Provide options for views ui admin specific to fields.
chado_views_handler_field::post_execute | ( | & | $values | ) |
Load the entities for all fields that are about to be displayed.
Notice that, although we load the entities for each chado field, Drupal caches entities to ensure we don't get a performance hit per field, just per row.
chado_views_handler_field::query | ( | $use_groupby = FALSE | ) |
Alter the views query to provide information for this field.
We are going to take the same approach as the field api and simply load the entities in order to get the values of the chado fields. The hope is that a small number of cached simple queries will be more efficient than the crazy joins that occur when using chado. fingers crossed
chado_views_handler_field::render | ( | $values | ) |
inheritdoc}
chado_views_handler_field::render_field | ( | $entity, | |
$field_name, | |||
$row_id | |||
) |
Render the field for display in the view.
TripalEntity | $entity | The entity containing the field to be rendered. |
string | $field_name | The name of the field to render. |
integer | $row_id | The id of the row this field will be displayed in. |