ObjectsController: API should ship full objects

This commit is contained in:
Thomas Gelf 2016-02-18 14:41:05 +01:00
parent 25deed9c60
commit 23325d96f4

View File

@ -106,10 +106,10 @@ abstract class ObjectsController extends ActionController
$this->view->filterEditor = $table->getFilterEditor($this->getRequest()); $this->view->filterEditor = $table->getFilterEditor($this->getRequest());
if ($this->getRequest()->isApiRequest()) { if ($this->getRequest()->isApiRequest()) {
$objects = array();
$objects = $this->db()->getDbAdapter()->fetchAll( foreach ($dummy::loadAll($this->db) as $object) {
$table->getBaseQuery()->columns(array('object_name', 'object_type', 'disabled')) $objects[] = $object->toPlainObject(false, true);
); }
return $this->sendJson((object) array('objects' => $objects)); return $this->sendJson((object) array('objects' => $objects));
} }