function chado_get_bundle_entity_table

3.x tripal_chado.entity.api.inc chado_get_bundle_entity_table($bundle)

A helper function that provides the Chado mapping table for the bundle.

The tripal_chado module must map entities to their corresponding record in Chado. Each bundl type has their own table for this mapping. This function provides the name of the table given the bundle name. A mapping table will only map to one table in Chado so the record_id's of the mapping table should always be unique.

Parameters

$bundle: A bundle object (as retrieved from tripal_load_bundle_entity().

Return value

The name of the mapping table that Chado uses to map entities to records.

Related topics

9 calls to chado_get_bundle_entity_table()
chado_get_record_entity_by_bundle in tripal_chado/api/tripal_chado.entity.api.inc
Retreive the entity_id assigned to a given record_id and bundle.
chado_publish_records in tripal_chado/api/tripal_chado.api.inc
Publishes content in Chado as a new TripalEntity entity.
tripal_chado_bundle_delete in tripal_chado/includes/tripal_chado.bundle.inc
Implements hook_bundle_delete().
tripal_chado_create_bundle_table in tripal_chado/includes/tripal_chado.bundle.inc
Creates the table that tripal_chado uses to link Chado records with entities.
tripal_chado_entity_load in tripal_chado/includes/tripal_chado.entity.inc
Implements hook_entity_load().

... See full list

File

tripal_chado/api/tripal_chado.entity.api.inc, line 118
Provides an application programming interface (API) to manage entities that use Chado as their base data.

Code

function chado_get_bundle_entity_table($bundle) {
  if (!$bundle) {
    return '';
  }
  return 'chado_' . $bundle->name;
}