Browse Source

Allows query object to be dumped as a string.

This is one way to solve #881
Valentin Guignon 6 years ago
parent
commit
7a4c736a31
1 changed files with 7 additions and 0 deletions
  1. 7 0
      tripal/includes/TripalFieldQuery.inc

+ 7 - 0
tripal/includes/TripalFieldQuery.inc

@@ -243,4 +243,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);
+  }
 }