'error', 'key' => 'export', 'method' => 'dashboardExport', 'data' => '', ]; $token = $request->headers->get('x-auth-token'); $security->isGranted('MAESTRO_PROJECT_PROJECTS_READ', $token); $groups = $userQuery->getGroups($token); $list = $projectExports->dashboardExport($projectId, $groups); if (is_array($list)) { $body['type'] = 'success'; $body['data'] = $list; $respond->statusOK(); } else { $respond->statusUnprocessableEntity(); } return $respond->createBody($body)->respond(); } }