function tripal_get_views_integration_setup_id

2.x tripal_views.api.inc tripal_get_views_integration_setup_id($table_name, $priority)
3.x tripal_chado_views.api.inc tripal_get_views_integration_setup_id($table_name, $priority)

Retrieve the views integration setup_id with the given priority/table combination.

Parameters

$table_name: The name of the table to retrieve the setup ID for. This can be either a materialized view or a chado table

$priority: The priority of the integration to retrieve the setup_id for

Return value

On success, the setup_id to use for integration of this table; otherwise FALSE

Related topics

2 calls to tripal_get_views_integration_setup_id()
tripal_clone_views_integration in tripal_views/api/tripal_views.api.inc
Clone an integration. This is often a great way to create your own module-specific integration while still benifiting from an existing (or even the lightest priority) integration.
tripal_views_get_setup_id in tripal_views/api/tripal_views.DEPRECATED.inc
1 string reference to 'tripal_get_views_integration_setup_id'

File

tripal_views/api/tripal_views.api.inc, line 469
API functions for Tripal Views Integration

Code

function tripal_get_views_integration_setup_id($table_name, $priority) {

  // D7 TODO: Check DBTNG changes work
  $sql = "SELECT setup_id FROM {tripal_views} WHERE table_name=:table AND priority=:priority ORDER BY priority ASC";
  $setup = db_query($sql, array(':table' => $table_name, ':priority' => $priority));
  $setup = $setup->fetchObject();
  if ($setup) {
    return $setup->setup_id;
  }
  else {
    return FALSE;
  }
}