function tripal_feature_exclude_field_from_feature_by_default

2.x tripal_feature.module tripal_feature_exclude_field_from_feature_by_default()
3.x tripal_feature.module tripal_feature_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 chado_generate_var() is called. Keep in mind that if fields are excluded by default they can always be expanded at a later date using chado_expand_var().

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:

  • <field_name> Replaced by the name of the field to be excluded
  • <field_value> Replaced by the value of the field in the current record

Also keep in mind that if your criteria doesn't contain the <field_value> 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 field => criteria where the type is excluded if the criteria evaluates to TRUE

Related topics

File

tripal_feature/tripal_feature.module, line 604
Basic functionality for the tripal module

Code

function tripal_feature_exclude_field_from_feature_by_default() {
  return array('residues' => 'TRUE');
}