function tripal_get_lightest_views_integration_priority
2.x tripal_views.api.inc | tripal_get_lightest_views_integration_priority($table_name) |
3.x tripal_chado_views.api.inc | tripal_get_lightest_views_integration_priority($table_name) |
Retrieve the priority of the lightest priority for a given table.
NOTE: Uses lightest priority (drupal-style) where the range is from -10 to 10 and -10 is of highest priority.
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
Return value
returns the lowest priority. If the table has not been integrated, a priority of 10 is returned.
Related topics
3 calls to tripal_get_lightest_views_integration_priority()
- tripal_add_field_to_views_integration in tripal_views/
api/ tripal_views.api.inc - Adds the given field to an existing or cloned integration. In the case of a cloned integration, the lightest integration is used as the template for the clone.
- tripal_add_join_to_views_integration in tripal_views/
api/ tripal_views.api.inc - Adds the given field to an existing or cloned integration. In the case of a cloned integration, the lightest integration is used as the template for the clone.
- tripal_views_get_table_lightest_priority in tripal_views/
api/ tripal_views.DEPRECATED.inc
1 string reference to 'tripal_get_lightest_views_integration_priority'
- tripal_views_get_table_lightest_priority in tripal_views/
api/ tripal_views.DEPRECATED.inc
File
- tripal_views/
api/ tripal_views.api.inc, line 411 - API functions for Tripal Views Integration
Code
function tripal_get_lightest_views_integration_priority($table_name) {
// D7 TODO: Check DBTNG changes work
$sql = "SELECT priority FROM {tripal_views} WHERE table_name=:table ORDER BY priority ASC";
$setup = db_query($sql, array(':table' => $table_name));
$setup = $setup->fetchObject();
if ($setup) {
return $setup->priority;
}
else {
// default priority is 10
return 10;
}
}