function theme_tripal_feature_search_index

1.x tripal_feature.admin.inc theme_tripal_feature_search_index($node)

This function is an extension of the chado_feature_view by providing the markup for the feature object THAT WILL BE INDEXED.

Related topics

1 theme call to theme_tripal_feature_search_index()
chado_feature_view in tripal_feature/tripal_feature.module
This function customizes the view of the chado_feature node. It allows us to generate the markup.

File

tripal_feature/includes/tripal_feature.admin.inc, line 574
@todo Add file header description

Code

function theme_tripal_feature_search_index($node) {
  $feature = $node->feature;
  $content = '';

  // get the accession prefix
  $aprefix = variable_get('chado_feature_accession_prefix', 'FID');

  $content .= "<h1>$feature->uniquename</h1>. ";
  $content .= "<strong>$aprefix$feature->feature_id.</strong> ";
  $content .= "$feature->cvname ";
  $content .= "$feature->common_name ";

  // add the synonyms of this feature to the text for searching
  $synonyms = $node->synonyms;
  if (count($synonyms) > 0) {
    foreach ($synonyms as $result) {
      $content .= "$result->name ";
    }
  }

  return $content;
}