public function listBelongingJsonAction() { $properties = array(); $staff = \StaffAuthenticationBackend::getUser(); if (isset($staff)) { $items = \model\Equipment::findByStaffId($staff->getId()); } foreach ($items as $item) { $properties[] = $item->getJsonProperties(); } echo json_encode($properties); }