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
1 changed files with 4 additions and 4 deletions

View File

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