Explorar o código

Apply suggestions from code review

Lacey-Anne Sanderson %!s(int64=4) %!d(string=hai) anos
pai
achega
d988fd4160

+ 2 - 1
tripal_chado/includes/TripalFields/sbo__relationship/sbo__relationship.inc

@@ -443,7 +443,8 @@ class sbo__relationship extends ChadoField {
     $clause = [ 'The ', $subject_type, ', ', $subject_name, ', ',
                 $verb, ' ', $rel_type_clean, ' ', $object_type,
                 ', ', $object_name, '.' ];
-    $entity->{$field_name}['und'][$delta]['value']['SIO:000493'] = $clause;
+    $entity->{$field_name}['und'][$delta]['clause_parts'] = $clause;
+    $entity->{$field_name}['und'][$delta]['value']['SIO:000493'] = implode('', $clause);
 
     // Adding a label allows us to provide a single text value for the
     // entire field. It is this text value that can be used in tab/csv

+ 1 - 2
tripal_chado/includes/TripalFields/sbo__relationship/sbo__relationship_formatter.inc

@@ -72,7 +72,7 @@ class sbo__relationship_formatter extends ChadoFieldFormatter {
       $subject_type = $item['value']['local:relationship_subject']['rdfs:type'];
       $object_name = $item['value']['local:relationship_object']['schema:name'];
       $object_type = $item['value']['local:relationship_object']['rdfs:type'];
-      $clause_parts = $item['value']['SIO:000493'];
+      $clause_parts = $item['clause_parts'];
 
       // Handle some special cases.
       // For mRNA objects we don't want to show the CDS, exons, 5' UTR, etc.
@@ -153,4 +153,3 @@ class sbo__relationship_formatter extends ChadoFieldFormatter {
   }
 }
 
-