+ /** Retrieve the 'WHERE' clause to use for this PlTableEditor.
+ * Takes into account $this->whereclause and $this->forced_values.
+ *
+ * @param $extra_clause optional extra clause to add to the WHERE
+ * @return The WHERE clause to use
+ */
+ protected function get_where_clause($extra_clause=null)
+ {
+ $parts = array();
+ $parts[] = $this->whereclause;
+ if ($extra_clause !== null) {
+ $parts[] = $extra_clause;
+ }
+ foreach ($this->forced_values as $field => $val) {
+ $parts[] = XDB::format("$field = {?}", $val);
+ }
+ return implode(' AND ', $parts);
+ }
+