function tripal_phylogeny_node_view

2.x tripal_phylogeny.chado_node.inc tripal_phylogeny_node_view($node, $view_mode, $langcode)
3.x tripal_phylogeny.chado_node.inc tripal_phylogeny_node_view($node, $view_mode, $langcode)

Implements hook_node_view(). Acts on all content types

Related topics

File

tripal_phylogeny/includes/tripal_phylogeny.chado_node.inc, line 50
Implements the phylotree node content type

Code

function tripal_phylogeny_node_view($node, $view_mode, $langcode) {

  if ($node->type != 'chado_phylotree') {
    return;
  }

  switch ($view_mode) {
    case 'full':
      $node->content['tripal_phylogeny_base'] = array(
        '#theme' => 'tripal_phylogeny_base',
        '#node' => $node,
        '#tripal_toc_id' => 'base',
        '#tripal_toc_title' => 'Overview',
        '#weight' => -100,
      );
      $node->content['tripal_phylogeny_phylogram'] = array(
        '#theme' => 'tripal_phylogeny_phylogram',
        '#node' => $node,
        '#tripal_toc_id' => 'phylotree_phylogram',
        '#tripal_toc_title' => 'Phylogram',
        '#weight' => -90,
      );
      $node->content['tripal_phylogeny_taxonomic_tree'] = array(
        '#theme' => 'tripal_phylogeny_taxonomic_tree',
        '#node' => $node,
        '#tripal_toc_id' => 'tripal_phylogeny_taxonomic_tree',
        '#tripal_toc_title' => 'Taxonomic Tree',
        '#weight' => -80,
      );
      $node->content['tripal_phylogeny_organisms'] = array(
        '#theme' => 'tripal_phylogeny_organisms',
        '#node' => $node,
        '#tripal_toc_id' => 'phylotree_organisms',
        '#tripal_toc_title' => 'Organisms',
        '#weight' => -70,
      );
      $node->content['tripal_phylogeny_references'] = array(
        '#theme' => 'tripal_phylogeny_references',
        '#node' => $node,
        '#tripal_toc_id' => 'phylotree_references',
        '#tripal_toc_title' => 'Cross References',
      );
      $node->content['tripal_phylogeny_analysis'] = array(
        '#theme' => 'tripal_phylogeny_analysis',
        '#node' => $node,
        '#tripal_toc_id' => 'phylotree_analysis',
        '#tripal_toc_title' => 'Analysis',
      );
      break;

    case 'teaser':
      $node->content['tripal_phylogeny_teaser'] = array(
        '#theme' => 'tripal_phylogeny_teaser',
        '#node' => $node,
      );
      break;
  }
}