/**
  * Edit a filter
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function editFilter(&$args, $request, $newFilter = false)
 {
     // Identify the filter to be edited
     if ($newFilter) {
         $filter = null;
     } else {
         $filter =& $this->getFilterFromArgs($request, $args, true);
     }
     // Form handling
     import('lib.pkp.classes.controllers.grid.filter.form.FilterForm');
     $filterForm = new FilterForm($filter, $this->getTitle(), $this->getFormDescription(), $this->getFilterGroupSymbolic());
     $filterForm->initData($this->getGridDataElements($request));
     return new JSONMessage(true, $filterForm->fetch($request));
 }
 /**
  * Edit a filter
  * @param $args array
  * @param $request PKPRequest
  */
 function editFilter(&$args, &$request, $newFilter = false)
 {
     // Identify the filter to be edited
     if ($newFilter) {
         $filter = null;
     } else {
         $filter =& $this->getFilterFromArgs($args, true);
     }
     // Form handling
     import('lib.pkp.classes.controllers.grid.filter.form.FilterForm');
     $filterForm = new FilterForm($filter, $this->getTitle(), $this->getFormDescription(), $this->getInputSample(), $this->getOutputSample());
     $filterForm->initData($this->getData());
     $json = new JSON('true', $filterForm->fetch($request));
     return $json->getString();
 }