1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- require('api/tripal_genetic.api.inc');
- require('includes/tripal_genetic.schema.inc');
- function tripal_genetic_views_api() {
- return array(
- 'api' => 2.0,
- );
- }
- function tripal_genetic_theme() {
- $theme_path = drupal_get_path('module', 'tripal_genetic') . '/theme';
- $items = array(
- 'tripal_feature_genotypes' => array(
- 'arguments' => array('node' => NULL),
- 'template' => 'tripal_feature_genotypes',
- 'path' => "$theme_path/tripal_feature",
- ),
- 'tripal_stock_genotypes' => array(
- 'arguments' => array('node' => NULL),
- 'template' => 'tripal_stock_genotypes',
- 'path' => "$theme_path/tripal_stock",
- ),
- );
- return $items;
- }
- function tripal_genetic_node_view(&$node, $view_mode, $langcode) {
- if ($node->type == 'chado_feature') {
-
-
-
-
-
- if ($view_mode == 'full') {
- if (!array_key_exists('tripal_feature_nd_genotypes', $node->content)) {
- $node->content['tripal_feature_genotypes'] = array(
- '#value' => theme('tripal_feature_genotypes', $node),
- );
- }
- }
- }
- if ($node->type == 'chado_stock') {
-
-
-
-
-
- if ($view_mode == 'full') {
- if (!array_key_exists('tripal_stock_nd_genotypes', $node->content)) {
- $node->content['tripal_stock_genotypes'] = array(
- '#value' => theme('tripal_stock_genotypes', $node),
- );
- }
- }
- }
- }
|