public function listJsonAction() { $offset = $this->_getParam('start'); $count = $this->_getParam('limit'); $sort = $this->_getParam('sort', 'name'); $direction = $this->_getParam('dir', 'DESC'); $filters = $this->_getParam('filter', array()); $order = $sort . ' ' . $direction; $dao = new RM_Plugins(); $total = $dao->filterAll($order, null, null, $filters)->count(); $rows = $dao->filterAll($order, $count, $offset, $filters)->toArray(); $extensions = RM_Environment::getInstance()->getOutOfDateExtensions(); foreach ($rows as $key => $row) { $rows[$key]['upgrade'] = in_array($row['name'], $extensions['plugins']); } $json = new stdClass(); $json->total = $total; $json->data = $rows; return array('data' => $json); }