'Phenotypes', 'description' => 'A controlled sentence describing observable effects of non-wild type function.', 'page callback' => 'tripal_phenotype_admin_phenotypes_listing', 'access arguments' => array('adminster tripal phenotype'), 'type' => MENU_NORMAL_ITEM, ); $items['admin/tripal/chado/tripal_phenotype/help'] = array( 'title' => 'Help', 'description' => "A description of the Tripal phenotype module including a short description of it's usage.", 'page callback' => 'theme', 'page arguments' => array('tripal_phenotype_help'), 'access arguments' => array('adminster tripal phenotype'), 'type' => MENU_LOCAL_TASK, ); $items['admin/tripal/chado/tripal_phenotype/views/phenotypes/enable'] = array( 'title' => 'Enable Phenotype Administrative View', 'page callback' => 'tripal_views_admin_enable_view', 'page arguments' => array('tripal_phenotype_admin_phenotypes', 'admin/tripal/chado/tripal_phenotype'), 'access arguments' => array('administer tripal phenotype'), 'type' => MENU_CALLBACK, ); return $items; } /** * We need to let drupal know about our theme functions and their arguments. * We create theme functions to allow users of the module to customize the * look and feel of the output generated in this module * * @ingroup tripal_phenotype */ function tripal_phenotype_theme($existing, $type, $theme, $path) { $core_path = drupal_get_path('module', 'tripal_core'); $items = array( 'tripal_feature_phenotypes' => array( 'variables' => array('node' => NULL), 'template' => 'tripal_feature.phenotypes', 'path' => "$path/theme/tripal_feature", ), 'tripal_phenotype_help' => array( 'template' => 'tripal_phenotype.help', 'variables' => array(NULL), 'path' => "$path/theme", ), ); return $items; } /** * Implements hook_views_api() * Purpose: Essentially this hook tells drupal that there is views support for * for this module which then includes tripal_phenotype.views.inc where all the * views integration code is * * @ingroup tripal_phenotype */ function tripal_phenotype_views_api() { return array( 'api' => 3.0, ); } function tripal_phenotype_admin_phenotypes_listing() { $output = ''; // set the breadcrumb $breadcrumb = array(); $breadcrumb[] = l('Home', ''); $breadcrumb[] = l('Administration', 'admin'); $breadcrumb[] = l('Tripal', 'admin/tripal'); $breadcrumb[] = l('Chado', 'admin/tripal/chado'); $breadcrumb[] = l('Phenotypes', 'admin/tripal/chado/tripal_phenotype'); drupal_set_breadcrumb($breadcrumb); // Add the view $view = views_embed_view('tripal_phenotype_admin_phenotypes','default'); if (isset($view)) { $output .= $view; } else { $output .= '

The Tripal Phenotype Module uses primarily views to provide an ' . 'administrative interface. Currently one or more views needed for this ' . 'administrative interface are disabled. Click each of the following links to ' . 'enable the pertinent views:

'; $output .= ''; } return $output; } /** * * @ingroup tripal_phenotype */ function tripal_phenotype_node_view($node, $view_mode, $langcode) { switch ($node->type) { case 'chado_feature': // Show feature browser and counts if ($view_mode == 'full') { $node->content['tripal_feature_phenotypes'] = array( '#value' => theme('tripal_feature_phenotypes', array('node' => $node)), ); } break; } }