Browse Source

Merge pull request #882 from guignonv/patch-6

Allows query object to be dumped as a string.
Bradford Condon 6 years ago
parent
commit
782df5a63e
1 changed files with 7 additions and 0 deletions
  1. 7 0
      tripal/includes/TripalFieldQuery.inc

+ 7 - 0
tripal/includes/TripalFieldQuery.inc

@@ -247,4 +247,11 @@ class TripalFieldQuery extends EntityFieldQuery {
       throw new EntityFieldQueryException(t("Field storage engine not found."));
     }
   }
+
+  /**
+   * Allows query object to be dumped as a string.
+   */
+  public function __toString() {
+    return print_r($this, TRUE);
+  }
 }