headers->get('x-auth-token'); $security->isGranted('MAESTRO_PROJECT_PROJECTS_READ', $token); $templates = $listQuery->listTemplatesByExport($id); if (!is_array($templates)) { $body = [ 'type' => 'error', 'key' => 'templates', 'method' => 'listTemplatesByExport', 'data' => '', ]; $respond->statusUnprocessableEntity(); } else { $body = [ 'type' => 'success', 'key' => 'templates', 'method' => 'listTemplatesByExport', 'data' => $templates, ]; $respond->statusOK(); } return $respond->createBody($body)->respond(); } }