Bläddra i källkod

Altered bundle class to have accession available

Stephen Ficklin 7 år sedan
förälder
incheckning
794b09af5d
2 ändrade filer med 4 tillägg och 2 borttagningar
  1. 3 1
      tripal/includes/TripalBundle.inc
  2. 1 1
      tripal/tripal.install

+ 3 - 1
tripal/includes/TripalBundle.inc

@@ -7,6 +7,8 @@ class TripalBundle extends Entity {
   public function __construct($values = array(), $entity_type) {
     parent::__construct($values, $entity_type);
 
+    $this->term = tripal_load_term_entity(array('term_id' => $bundle->term_id));
+    $vocab = $term->vocab;
+    $this->accession = $vocab->vocabulary . ':' . $term->accession;
   }
-
 }

+ 1 - 1
tripal/tripal.install

@@ -370,7 +370,7 @@ function tripal_tripal_collection_bundle_schema() {
         'not null' => TRUE
       ),
       'collection_id' => array(
-        'type' => 'varchar',
+        'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE
       ),