public function outputArray(array $array, $count = false) { if ($this->getProperty('json', false)) { return parent::outputArray($array, $count); } // else return array('success' => true, 'message' => '', 'total' => $count, 'object' => $array); }
public function outputArray(array $array, $count = false) { if ($this->getProperty('output_format') == 'tree') { return $this->modx->toJSON($array); } else { if ($this->getProperty('output_format') == 'json') { return parent::outputArray($array, $count); } } // else return array("success" => 1, "message" => "", "total" => $count, "count" => count($array), "object" => $array); }