public function chado_linker__contact::elementInfo

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

Overrides TripalField::elementInfo

See also

TripalField::elements()

File

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

Class

chado_linker__contact

Code

public function elementInfo() {

  $field_term = $this->getFieldTermID();
  $type_term = chado_get_semweb_term('contact', 'type_id');
  $name_term = chado_get_semweb_term('contact', 'name');
  $description_term = chado_get_semweb_term('contact', 'description');

  return array(
    $field_term => array(
      'operations' => array('eq', 'contains', 'starts'),
      'sortable' => TRUE,
      'searchable' => TRUE,
      'type' => 'xs:complexType',
      'readonly' => FALSE,
      'elements' => array(
        $type_term => array(
          'searchable' => TRUE,
          'label' => 'Contact Type',
          'help' => 'The type of contact',
          'operations' => array('eq', 'ne', 'contains', 'starts'),
          'sortable' => TRUE,
          'type' => 'xs:string',
          'readonly' => FALSE,
          'required' => TRUE,
        ),
        $name_term => array(
          'searchable' => TRUE,
          'label' => 'Contact Name',
          'help' => 'The name of the contact.',
          'operations' => array('eq', 'ne', 'contains', 'starts'),
          'sortable' => TRUE,
          'type' => 'xs:string',
          'readonly' => FALSE,
          'required' => TRUE,
        ),
        $description_term => array(
          'searchable' => TRUE,
          'label' => 'Contact Description',
          'help' => 'A descriptoin of the contact.',
          'operations' => array('contains'),
          'sortable' => TRUE,
          'type' => 'xs:string',
          'readonly' => TRUE,
          'required' => FALSE,
        ),
        'entity' => array(
          'searchable' => FALSE,
        ),
      ),
    )
  );
}