Sfoglia il codice sorgente

Tripal Pub adheres to Drupal coding standards

Pubudu Basnayaka 12 anni fa
parent
commit
504d6e7883
3 ha cambiato i file con 500 aggiunte e 509 eliminazioni
  1. 5 6
      tripal_pub/tripal_pub.install
  2. 482 490
      tripal_pub/tripal_pub.module
  3. 13 13
      tripal_pub/tripal_pub.views.inc

+ 5 - 6
tripal_pub/tripal_pub.install

@@ -12,7 +12,7 @@
 
 
 /**
- * Implementation of hook_install()
+ * Implementation of hook_install().
  */
 function tripal_pub_install() {
 
@@ -20,14 +20,13 @@ function tripal_pub_install() {
   $dbxref = array('accession' => 'abstract', 'db_id' => array('name' => 'tripal'));
   $success = tripal_core_chado_insert('dbxref', $dbxref);
   if ($success) {
-    tripal_core_chado_insert('cvterm', array('name' => 'abstract', 'cv_id' => array('name' => 'tripal'), 'db
-xref_id' => $dbxref));
+    tripal_core_chado_insert('cvterm', array('name' => 'abstract', 'cv_id' => array('name' => 'tripal'), 'dbxref_id' => $dbxref));
   }
 }
 
 
 /**
- * Implementation of hook_uninstall()
+ * Implementation of hook_uninstall().
  */
 function tripal_pub_uninstall() {
   //Remove tables
@@ -37,7 +36,7 @@ function tripal_pub_uninstall() {
 
 
 /**
- * Implementation of hook_schema()
+ * Implementation of hook_schema().
  */
 function tripal_pub_schema() {
 //specification for 'tripal_pub_instances'
@@ -78,7 +77,7 @@ function tripal_pub_schema() {
         'default' => '',
         'description' => 'The Author Name.',
       ),
-     ),
+      ),
      //end of shema
 
     'primary key' => array('nid'),

File diff suppressed because it is too large
+ 482 - 490
tripal_pub/tripal_pub.module


+ 13 - 13
tripal_pub/tripal_pub.views.inc

@@ -6,17 +6,17 @@
  *  chado/tripal_pub tables. Supplementary functions can be found in
  *  ./views/
  *
- *  Documentation on views integration can be found at 
+ *  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 
+ *   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)
  */
@@ -29,11 +29,11 @@ function tripal_pub_views_data()  {
     );
     foreach ($tables as $tablename) {
       if (!tripal_views_is_integrated($tablename, 10)) {
-        $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename,TRUE);
+        $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE);
         tripal_views_integration_add_entry($table_integration_array);
       }
     }
-        
+
     $tables = array(
       'pub_dbxref',
       'pub_relationship',
@@ -42,30 +42,30 @@ function tripal_pub_views_data()  {
     );
     foreach ($tables as $tablename) {
       if (!tripal_views_is_integrated($tablename, 10)) {
-        $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename,FALSE);
+        $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, FALSE);
         tripal_views_integration_add_entry($table_integration_array);
       }
     }
   }
-  
+
   return $data;
 }
 
 /*************************************************************************
  * Implements hook_views_handlers()
  * Purpose: Register all custom handlers with views
- *   where a handler describes either "the type of field", 
+ *   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(
+  return array(
    'info' => array(
      'path' => drupal_get_path('module', 'tripal_pub') . '/views/handlers',
-   ),
+    ),
    'handlers' => array(
 
-   ),
- );
-}
+    ),
+  );
+}

Some files were not shown because too many files changed in this diff