Prechádzať zdrojové kódy

Changed tripal_entities_storage to field_chado_storage and added tripal_entities.chado_entity.inc file

Stephen Ficklin 9 rokov pred
rodič
commit
4654362790

+ 1 - 1
tripal_entities/includes/TripalDataController.inc

@@ -131,7 +131,7 @@ class TripalDataController extends EntityAPIController {
     }
 
     // Invoke either hook_entity_update() or hook_entity_insert().
-    module_invoke_all($invocation, $entity, $entity->entity_type);
+//    module_invoke_all($invocation, $entity, $entity->entity_type);
 
     return $entity;
   }

+ 1 - 1
tripal_entities/includes/tripal_entities.admin.inc

@@ -510,7 +510,7 @@ function tripal_entities_add_bundle_fields($tablename, $entity_type_name, $bundl
         'cardinality' => 1,
         'locked' => TRUE,
         'storage' => array(
-          'type' => 'tripal_entities_storage'
+          'type' => 'field_chado_storage'
         ),
       );
       field_create_field($field);

+ 35 - 0
tripal_entities/includes/tripal_entities.chado_entity.inc

@@ -0,0 +1,35 @@
+<?php
+
+/**
+ *
+ * Implements hook_entity_load().
+ */
+function tripal_entities_entity_load($entities, $type) {
+  foreach ($entities as $id => $entity) {
+
+  }
+}
+
+/**
+ *
+ * Implements hook_entity_insert().
+ */
+function tripal_entities_entity_insert($entity, $type) {
+
+}
+
+/**
+ *
+ * Implements hook_entity_update().
+ */
+function tripal_entities_entity_update($entity, $type) {
+
+}
+
+/**
+ *
+ * Implements hook_entity_delete().
+ */
+function tripal_entities_entity_delete($entity, $type) {
+
+}

+ 1 - 2
tripal_entities/includes/tripal_entities.field_storage.inc

@@ -4,7 +4,7 @@
  */
 function tripal_entities_field_storage_info() {
   return array(
-    'tripal_entities_storage' => array(
+    'field_chado_storage' => array(
       'label' => t('Chado storage'),
       'description' => t('Stores fields in the local Chado database.'),
       'settings' => array(),
@@ -73,7 +73,6 @@ function tripal_entities_field_storage_write($entity_type, $entity, $op, $fields
  */
 function tripal_entities_field_storage_load($entity_type, $entities, $age, $fields, $options) {
   $load_current = $age == FIELD_LOAD_CURRENT;
-
   global $language;
   $langcode = $language->language;
 

+ 1 - 1
tripal_entities/includes/tripal_entities.fields.inc

@@ -12,7 +12,7 @@ function tripal_entities_field_info() {
       'default_formatter' => 'tripal_entities_organism_formatter',
       'settings' => array(),
       'storage' => array(
-        'type' => 'tripal_entities_storage',
+        'type' => 'field_chado_storage',
         'module' => 'tripal_entities',
         'active' => TRUE
       ),

+ 1 - 0
tripal_entities/tripal_entities.module

@@ -1,6 +1,7 @@
 <?php
 
 require_once "api/tripal_entities.api.inc";
+require_once "includes/tripal_entities.chado_entity.inc";
 require_once "includes/tripal_entities.field_storage.inc";
 require_once "includes/tripal_entities.fields.inc";
 require_once "includes/tripal_entities.tables.inc";