function tripal_phylogeny_node_update

2.x tripal_phylogeny.chado_node.inc tripal_phylogeny_node_update($node)
3.x tripal_phylogeny.chado_node.inc tripal_phylogeny_node_update($node)

Implements hook_node_update(). Acts on all content types.

Related topics

File

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

Code

function tripal_phylogeny_node_update($node) {

  switch ($node->type) {
    case 'chado_phylotree':

      $phylotree_id = chado_get_id_from_nid('phylotree', $node->nid);
      $values = array('phylotree_id' => $phylotree_id);
      $phylotree = chado_generate_var('phylotree', $values);
      $phylotree = chado_expand_var($phylotree, 'field', 'phylotree.comment');
      $node->phylotree = $phylotree;

      // Now get the title
      $node->title = chado_get_node_title($node);

      break;
  }
}