Sfoglia il codice sorgente

Change of tripal_publication to tripal_pub

laceysanderson 14 anni fa
parent
commit
99d8efec6e
3 ha cambiato i file con 78 aggiunte e 0 eliminazioni
  1. 10 0
      tripal_pub/tripal_pub.info
  2. 22 0
      tripal_pub/tripal_pub.module
  3. 46 0
      tripal_pub/tripal_pub.views.inc

+ 10 - 0
tripal_pub/tripal_pub.info

@@ -0,0 +1,10 @@
+; $Id$
+package = Tripal
+name = Tripal Publication
+version = 0.3a
+description = A module for interfacing the GMOD chado database with Drupal, providing viewing of publications
+core = 6.x
+
+dependencies[] = tripal_core
+dependencies[] = tripal_cv
+dependencies[] = tripal_db

+ 22 - 0
tripal_pub/tripal_pub.module

@@ -0,0 +1,22 @@
+<?php
+
+/**
+ *  @file
+ * This file contains the basic functions needed for this drupal module.
+ * The drupal tripal_pub 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_pub.views.inc where all the
+ *  views integration code is
+ */ 
+function tripal_pub_views_api() {
+   return array(
+      'api' => 2.0,
+   );
+}

+ 46 - 0
tripal_pub/tripal_pub.views.inc

@@ -0,0 +1,46 @@
+<?php
+
+/**
+ *  @file
+ *  This file contains the basic functions for views integration of
+ *  chado/tripal_pub tables. Supplementary functions can be found in
+ *  ./views/
+ *
+ *  Documentation on views integration can be found at 
+ *  http://views2.logrus.com/doc/html/index.html.
+ */
+ 
+/*************************************************************************
+ * Implements hook_views_data()
+ * Purpose: Describe chado/tripal tables & fields to views
+ *
+ * @return: a data array which follows the structure outlined in the
+ *   views2 documentation for this hook. Essentially, it's an array of table
+ *   definitions keyed by chado/tripal table name. Each table definition 
+ *   includes basic details about the table, fields in that table and
+ *   relationships between that table and others (joins)
+ */
+function tripal_pub_views_data()  {
+  $data = array();
+  
+  return $data;
+}
+
+/*************************************************************************
+ * Implements hook_views_handlers()
+ * Purpose: Register all custom handlers with views
+ *   where a handler describes either "the type of field", 
+ *   "how a field should be filtered", "how a field should be sorted"
+ *
+ * @return: An array of handler definitions
+ */
+function tripal_pub_views_handlers() {
+ return array(
+   'info' => array(
+     'path' => drupal_get_path('module', 'tripal_pub') . '/views/handlers',
+   ),
+   'handlers' => array(
+
+   ),
+ );
+}