public function __construct(array $json, $negate = false, CronkGridTemplateWorker $tpl = null)
 {
     $this->field = $tpl->getTemplateFilterField($json["field"]);
     $this->field = $tpl->getView()->enableFilter($this->field);
     $this->field = $tpl->getView()->getAliasedTableFromDQL($this->field);
     $this->operator = $json["operator"];
     $this->value = $json["value"] ? $json["value"] : '0';
     $this->negateOffset = $negate ? 1 : 0;
 }
 private function applyLegacyFilter($pKey, $pVal, CronkGridTemplateWorker $template)
 {
     $m = array();
     if (preg_match('@^(.+)-value$@', $pKey, $m)) {
         // Fieldname (xml field name)
         $name = $m[1];
         // The value
         $val = $pVal;
         // Operator
         $op = array_key_exists($name . '-operator', $this->params_array) ? $this->params_array[$name . '-operator'] : null;
         // Add a template worker condition
         $template->setCondition($name, $val, $op);
     }
 }