Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }