function tripal_core_exclude_field_from_feature_by_default

1.x tripal_core_chado.api.inc tripal_core_exclude_field_from_feature_by_default()

Implements hook_exclude_field_from_<tablename>_by_default()

This hooks allows fields from a specified table that match a specified criteria to be excluded by default from any table when tripal_core_generate_chado_var() is called. Keep in mind that if fields are excluded by default they can always be expanded at a later date using tripal_core_expand_chado_vars().

Criteria are php strings that evaluate to either TRUE or FALSE. These strings are evaluated using drupal_eval() which suppresses syntax errors and throws watchdog entries of type php. There are also watchdog entries of type tripal_core stating the exact criteria evaluated. Criteria can contain the following tokens:

  • &gt;field_name&lt; Replaced by the name of the field to be excluded
  • &gt;field_value&lt; Replaced by the value of the field in the current record

Also keep in mind that if your criteria doesn't contain the &gt;field_value&lt; token then it will be evaluated before the query is executed and if the field is excluded it won't be included in the query.

Return value

An array of type => criteria where the type is excluded if the criteria evaluates to TRUE

Related topics

File

tripal_core/api/tripal_core_chado.api.inc, line 2333
The Tripal Core API

Code

function tripal_core_exclude_field_from_feature_by_default() {
  return array();
}