1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- require_once('tripal_natural_diversity.api.inc');
- /**
- * @file
- * 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 http://gmod.org/wiki/Chado_General_Module
- */
- /*************************************************************************
- * Implements hook_views_api()
- * Purpose: Essentially this hook tells drupal that there is views support for
- * for this module which then includes tripal_natural_diversity.views.inc where all the
- * views integration code is
- */
- function tripal_natural_diversity_views_api() {
- return array(
- 'api' => 2.0,
- );
- }
- /**
- * Implements hook_theme
- */
- function tripal_natural_diversity_theme() {
- return array(
- 'tripal_feature_genotype_experiments' => array(
- 'arguments' => array('node' => NULL),
- 'template' => 'tripal_feature-genotype_experiments',
- ),
- 'tripal_stock_genotype_experiments' => array(
- 'arguments' => array('node' => NULL),
- 'template' => 'tripal_feature-stock_experiments',
- ),
- );
- }
- /**
- *
- */
- function tripal_natural_diversity_nodeapi(&$node, $op, $teaser, $page) {
- switch ($op) {
- case 'view':
- if ($node->type == 'chado_feature') {
- $node->content['tripal_feature_genotype_experiments'] = array(
- '#value' => theme('tripal_feature_genotype_experiments', $node),
- );
- }
- elseif ($node->type == 'chado_stock') {
- $node->content['tripal_stock_genotype_experiments'] = array(
- '#value' => theme('tripal_stock_genotype_experiments', $node),
- );
- }
- }
- }
|