public function operation__phylotree_vis::load

3.x operation__phylotree_vis.inc public operation__phylotree_vis::load($entity)

Overrides TripalField::load

See also

TripalField::load()

File

tripal_chado/includes/TripalFields/operation__phylotree_vis/operation__phylotree_vis.inc, line 62

Class

operation__phylotree_vis

Code

public function load($entity) {

  $record = $entity->chado_record;
  $settings = $this->instance['settings'];

  $field_name = $this->field['field_name'];
  $field_type = $this->field['type'];
  $field_table = $this->instance['settings']['chado_table'];
  $field_column = $this->instance['settings']['chado_column'];

  // Get the terms for each of the keys for the 'values' property.
  $label_term = 'operation:0567';

  // Set some defaults for the empty record.
  $entity->{$field_name}['und'][0]['value'] = array();

  if ($record) {
    $entity->{$field_name}['und'][0]['value'] = array(
      'schema:url' => url('bio_data/' . $entity->id, array('absolute' => TRUE)),
    );
  }
}