Tripal
Functions
Chado Contact
Collaboration diagram for Chado Contact:

Functions

 chado_insert_contact ($values)
 
 chado_autocomplete_contact ($text)
 

Detailed Description

Provides API functions for working with chado records in Chado that go beyond the generic Chado API functions.

Function Documentation

◆ chado_autocomplete_contact()

chado_autocomplete_contact (   $text)

This function is intended to be used in autocomplete forms for contacts.

Parameters
$textThe string to search for.
Returns
A json array of terms that begin with the provided string.

◆ chado_insert_contact()

chado_insert_contact (   $values)

Adds a contact to the Chado contact table.

Parameters
$valuesAn array of values to be inserted. Valid keys include:
  • name: The name of the contact.
  • description: Text describing the contact.
  • type_name: The type of contact. Must be a term in the tripal_contact vocabulary.
  • properties: An associative array containing a list of key value pairs for the properites. The key's must be valid terms in the tripal_contact vocabulary (e.g. Affiliation, Address, etc).
Returns
On success, an array is returned containing the fields of the contact record including the newly added contact_id. On failure, FALSE is returned.