Tripal
All Classes Files Functions Variables Modules Pages
Public Member Functions | List of all members
chado_views_handler_field Class Reference
Inheritance diagram for chado_views_handler_field:
Inheritance graph
[legend]
Collaboration diagram for chado_views_handler_field:
Collaboration graph
[legend]

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 ()
 

Detailed Description

Views Field Handler for chado fields. Uses the same approach as the field api views_handler_field_field.

Member Function Documentation

◆ option_definition()

chado_views_handler_field::option_definition ( )

Define the options we are going to provide.

◆ options_form()

chado_views_handler_field::options_form ( $form,
$form_state 
)

Provide options for views ui admin specific to fields.

◆ post_execute()

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.

◆ query()

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

◆ render()

chado_views_handler_field::render (   $values)

inheritdoc}

◆ render_field()

chado_views_handler_field::render_field (   $entity,
  $field_name,
  $row_id 
)

Render the field for display in the view.

Parameters
TripalEntity$entityThe entity containing the field to be rendered.
string$field_nameThe name of the field to render.
integer$row_idThe id of the row this field will be displayed in.
Returns
string The rendered field.

The documentation for this class was generated from the following file: