12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?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() {
- return array(
- 'tripal_feature_genotypes' => array(
- 'arguments' => array('node' => NULL),
- 'template' => 'tripal_feature_genotypes',
- ),
- 'tripal_stock_genotypes' => array(
- 'arguments' => array('node' => NULL),
- 'template' => 'tripal_stock_genotypes',
- ),
- );
- }
- function tripal_genetic_nodeapi(&$node, $op, $teaser, $page) {
- switch ($op) {
- case 'view':
- if ($node->type == 'chado_feature') {
-
-
-
-
-
- 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 (!array_key_exists('tripal_stock_nd_genotypes', $node->content)) {
- $node->content['tripal_stock_genotypes'] = array(
- '#value' => theme('tripal_stock_genotypes', $node),
- );
- }
- }
- break;
- }
- }
|