'error', 'key' => '', 'method' => 'list', 'data' => '', ]; $token = $request->headers->get('x-auth-token'); $security->isGranted('MAESTRO_PROJECT_PROJECTS_LIST', $token); $list = $indexQuery->list($id); if (is_array($list)) { $body['type'] = 'success'; $body['data'] = $list; $respond->statusOk(); } else { $respond->statusNotFound(); } return $respond->createBody($body)->respond(); } }