Tripal v1.0 (6.x-1.0)
tripal_natural_diversity.module File Reference

Go to the source code of this file.

Functions

 tripal_natural_diversity_views_api ()
 tripal_natural_diversity_theme ()
 tripal_natural_diversity_nodeapi (&$node, $op, $teaser, $page)
 tripal_natural_diversity_preprocess_tripal_stock_nd_genotypes (&$variables)

Detailed Description

This file contains the basic functions needed for this drupal module. The drupal tripal_natural_diversity module maps directly to the chado X module.

For documentation regarding the Chado X module:

See also:
http://gmod.org/wiki/Chado_General_Module

Definition in file tripal_natural_diversity.module.


Function Documentation

tripal_natural_diversity_nodeapi ( &$  node,
op,
teaser,
page 
)

Definition at line 54 of file tripal_natural_diversity.module.

                                                                      {  
  switch ($op) {
    case 'view':
      if ($node->type == 'chado_feature') {
        // the tripal_genetic module provides a tripal_feature_genotype
        // template.  The only difference between them is the addition of 
        // project information by this module's template.  Therefore,
        // if the tripal_genetic content is present get rid of as this
        // module superceeds it.
        if (array_key_exists('tripal_feature_genotypes', $node->content)) {
          unset($node->content['tripal_feature_genotypes']);
        }
        $node->content['tripal_feature_nd_genotypes'] = array(
           '#value' => theme('tripal_feature_nd_genotypes', $node),
        );
      }
      if ($node->type == 'chado_stock') {
        $node->content['tripal_stock_nd_genotypes'] = array(
           '#value' => theme('tripal_stock_nd_genotypes', $node),
        );
        $node->content['tripal_stock_nd_phenotypes'] = array(
           '#value' => theme('tripal_stock_nd_phenotypes', $node),
        );
        $node->content['tripal_stock_nd_locations'] = array(
           '#value' => theme('tripal_stock_nd_locations', $node),
        );
      }
      break;
  }
}
tripal_natural_diversity_preprocess_tripal_stock_nd_genotypes ( &$  variables)

Definition at line 88 of file tripal_natural_diversity.module.

                                                                                   {

}
tripal_natural_diversity_theme ( )

Implements hook_theme

Definition at line 30 of file tripal_natural_diversity.module.

                                          {
  return array(
    'tripal_feature_nd_genotypes' => array(
      'arguments' => array('node' => NULL),
      'template' => 'tripal_feature_nd_genotypes',
    ),
    'tripal_stock_nd_genotypes' => array(
      'arguments' => array('node' => NULL),
      'template' => 'tripal_stock_nd_genotypes',
    ),
    'tripal_stock_nd_phenotypes' => array(
      'arguments' => array('node' => NULL),
      'template' => 'tripal_stock_nd_phenotypes',
    ),
    'tripal_stock_nd_locations' => array(
      'arguments' => array('node' => NULL),
      'template' => 'tripal_stock_nd_locations',
    ),
  );
}
tripal_natural_diversity_views_api ( )

Definition at line 21 of file tripal_natural_diversity.module.

                                              {
  return array(
      'api' => 2.0,
  );
}
 All Classes Files Functions Variables