123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- class taxrank__infraspecific_taxon extends ChadoField {
-
-
-
-
-
-
-
-
- public static $default_label = 'Infraspecific Taxon';
-
- public static $description = 'Specifies the infraspecific taxon of an organism.';
-
-
-
-
-
-
-
- public static $default_instance_settings = array(
-
- 'term_vocabulary' => 'TAXRANK',
-
- 'term_name' => 'infraspecific_taxon',
-
- 'term_accession' => '0000046',
-
-
-
- 'term_fixed' => FALSE,
- );
-
- public static $default_widget = 'HERE_widget';
-
- public static $default_formatter = 'HERE_formatter';
-
-
-
-
-
- protected $field;
-
-
-
- protected $instance;
-
- public function load($entity, $details = array()) {
- $record = $details['record'];
- $settings = $this->field['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'];
-
- $entity->{$field_name}['und'][0] = array(
- 'value' => '',
- 'organism__type_id' => '',
- );
- if ($record->type_id) {
- $entity->{$field_name}['und'][0]['value'] = $record->type_id->name;
- $entity->{$field_name}['und'][0]['organism__type_id'] = $record->type_id->cvterm_id;
- }
- }
- }
|