Browse Source

Typo, add test (WIP)

Ferrisx4 4 years ago
parent
commit
dea8306b4d

+ 7 - 0
tripal_chado/includes/TripalFields/sbo__relationship/sbo__relationship.inc

@@ -237,6 +237,7 @@ class sbo__relationship extends ChadoField {
     // Determine the name and type columns.
     $this->base_name_columns = [];
     $this->base_type_column = 'table_name';
+    //dpm($instance['settings']['chado_table']);
     switch ($instance['settings']['chado_table']) {
 
       // TODO: note that Chado 1.4 will add types to, at least,
@@ -266,6 +267,12 @@ class sbo__relationship extends ChadoField {
         $this->base_name_columns = ['name'];
         $this->base_type_column = 'type_id';
         break;
+
+      case 'feature_relationship':
+        $this->base_name_columns = ['uniquename'];
+        $this->base_type_column = 'type_id';
+      break;
+
       default:
         // @todo update this to use the schema.
         $this->base_name_columns = ['name'];

+ 1 - 1
tripal_chado/includes/TripalFields/so__transcript/so__transcript_formatter.inc

@@ -32,7 +32,7 @@ class so__transcript_formatter extends ChadoFieldFormatter {
       $loc = $transcript['SO:0000735'];
       $type = $transcript['rdfs:type'];
 
-      // Add a link i there is an entity.
+      // Add a link if there is an entity.
       if (array_key_exists('entity', $item['value']) and $item['value']['entity']) {
         list($entity_type, $entity_id) = explode(':', $item['value']['entity']);
         $feature_name = l($feature_name, "bio_data/" . $entity_id, ['attributes' => ['target' => "_blank"]]);