Эх сурвалжийг харах

Allows query object to be dumped as a string.

This is one way to solve #881
Valentin Guignon 6 жил өмнө
parent
commit
7a4c736a31

+ 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);
+  }
 }