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