Example #1
0
 public function prepareRow($object)
 {
     $row = parent::prepareRow($object);
     $menu = array();
     $menu[] = array('text' => 'Удалить цвет', 'handler' => 'this.ClearColor');
     $row['menu'] = $menu;
     return $row;
 }
 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);
 }
Example #3
0
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c = parent::prepareQueryBeforeCount($c);
     $c->select(array("`{$this->classKey}`.*"));
     return $c;
 }