Tripal
All Classes Files Functions Variables Modules Pages
Functions
tripal_phylogeny.chado_node.inc File Reference

Functions

 tripal_phylogeny_node_info ()
 
 tripal_phylogeny_node_view ($node, $view_mode, $langcode)
 
 chado_phylotree_form ($node, &$form_state)
 
 chado_phylotree_validate_newick_format (stdClass $file)
 
 chado_phylotree_validate ($node, $form, &$form_state)
 
 tripal_phylogeny_node_presave ($node)
 
 tripal_phylogeny_node_insert ($node)
 
 tripal_phylogeny_node_update ($node)
 
 chado_phylotree_chado_node_default_title_format ()
 
 chado_phylotree_chado_node_default_url_format ()
 
 chado_phylotree_insert ($node)
 
 chado_phylotree_update ($node)
 
 chado_phylotree_load ($nodes)
 
 chado_phylotree_delete (&$node)
 
 chado_phylotree_node_access ($node, $op, $account)
 
 phylotree_feature_summary ($phylotree_id)
 

Detailed Description

Implements the phylotree node content type

Function Documentation

◆ chado_phylotree_chado_node_default_title_format()

chado_phylotree_chado_node_default_title_format ( )

Implements [content_type]_chado_node_default_title_format().

Defines a default title format for the Chado Node API to set the titles on Chado phylotree nodes based on chado fields.

◆ chado_phylotree_chado_node_default_url_format()

chado_phylotree_chado_node_default_url_format ( )

Implements hook_chado_node_default_url_format().

Designates a default URL format for phylotree nodes.

◆ chado_phylotree_delete()

chado_phylotree_delete ( $node)

Implements hook_delete().

Delete data from drupal and chado databases when a node is deleted

◆ chado_phylotree_form()

chado_phylotree_form (   $node,
$form_state 
)

Implementation of hook_form().

◆ chado_phylotree_insert()

chado_phylotree_insert (   $node)

Implements hook_insert().

When a new chado_phylotree node is created we also need to add information to our chado_phylotree table. This function is called on insert of a new node of type 'chado_phylotree' and inserts the necessary information.

◆ chado_phylotree_load()

chado_phylotree_load (   $nodes)

Implements hook_load().

When a node is requested by the user this function is called to allow us to add auxiliary data to the node object.

◆ chado_phylotree_node_access()

chado_phylotree_node_access (   $node,
  $op,
  $account 
)

Implement hook_node_access().

This hook allows node modules to limit access to the node types they define.

Parameters
$nodeThe node on which the operation is to be performed, or, if it does not yet exist, the type of node to be created
$opThe operation to be performed
$accountA user object representing the user for whom the operation is to be performed
Returns
If the permission for the specified operation is not set then return FALSE. If the permission is set then return NULL as this allows other modules to disable access. The only exception is when the $op == 'create'. We will always return TRUE if the permission is set.

◆ chado_phylotree_update()

chado_phylotree_update (   $node)

Implements hook_update().

◆ chado_phylotree_validate()

chado_phylotree_validate (   $node,
  $form,
$form_state 
)

Implementation of hook_validate().

This validation is being used for three activities: CASE A: Update a node that exists in both drupal and chado CASE B: Synchronizing a node from chado to drupal CASE C: Inserting a new node that exists in niether drupal nor chado

◆ chado_phylotree_validate_newick_format()

chado_phylotree_validate_newick_format ( stdClass  $file)

A validation function for checking the newick file format.

Parameters
stdClass$fileA Drupal file object.

◆ phylotree_feature_summary()

phylotree_feature_summary (   $phylotree_id)

Phylotree feature summary.

Get an array of feature counts by organism. key = organism abbreviation. value = number of features for this phylotree having this organism.

Parameters
intphylotree_id
Returns
array

◆ tripal_phylogeny_node_info()

tripal_phylogeny_node_info ( )

Implements hook_node_info().

Provide information to drupal about the node types that we're creating in this module.

◆ tripal_phylogeny_node_insert()

tripal_phylogeny_node_insert (   $node)

Implements hook_node_insert(). Acts on all content types.

◆ tripal_phylogeny_node_presave()

tripal_phylogeny_node_presave (   $node)

Implements hook_node_presave(). Acts on all node content types.

◆ tripal_phylogeny_node_update()

tripal_phylogeny_node_update (   $node)

Implements hook_node_update(). Acts on all content types.

◆ tripal_phylogeny_node_view()

tripal_phylogeny_node_view (   $node,
  $view_mode,
  $langcode 
)

Implements hook_node_view(). Acts on all content types