public function taxrank__infraspecific_taxon::elementInfo

3.x taxrank__infraspecific_taxon.inc public taxrank__infraspecific_taxon::elementInfo()

Overrides TripalField::elementInfo

See also

TripalField::elementInfo()

File

tripal_chado/includes/TripalFields/taxrank__infraspecific_taxon/taxrank__infraspecific_taxon.inc, line 60

Class

taxrank__infraspecific_taxon

Code

public function elementInfo() {
  $field_term = $this->getFieldTermID();

  $label_term = 'rdfs:label';
  $infraspecific_name_term = chado_get_semweb_term('organism', 'infraspecific_name');
  $infraspecific_type_term = chado_get_semweb_term('organism', 'type_id');

  return array(
    $field_term => array(
      'sortable' => FALSE,
      'searchable' => TRUE,
      'readonly' => FALSE,
      'type' => 'xs:complexType',
      'elements' => array(
        $label_term => array(
          'name' => 'label',
          'sortable' => FALSE,
          'searchable' => TRUE,
          'label' => 'Infraspecific Full Name',
          'help' => 'The full infraspecific name including the rank and name.',
          'type' => 'xsstring',
          'readonly' => TRUE,
          'required' => FALSE,
        ),
        $infraspecific_name_term => array(
          'name' => 'infraspecific_name',
          'sortable' => TRUE,
          'searchable' => TRUE,
          'label' => 'Infraspecies Name',
          'help' => 'The infraspecific name of the organism below the rank of species.',
          'type' => 'xs:string',
          'readonly' => FALSE,
          'required' => TRUE,
        ),
        $infraspecific_type_term => array(
          'name' => 'infraspecific_rank',
          'sortable' => TRUE,
          'searchable' => TRUE,
          'label' => 'Infraspecific Rank',
          'help' => 'The infraspecific rank of the organism below the rank of species.',
          'type' => 'xs:string',
          'readonly' => FALSE,
          'required' => TRUE,
        ),
      ),
    ),
  );
}