'error', 'key' => 'export', 'method' => 'save', 'data' => '' ]; $token = $request->headers->get('x-auth-token'); $userId = $security->getUser()->getId(); $security->isGranted('MAESTRO_PROJECT_PROJECTS_UPDATE', $token); $data = json_decode($request->getContent(), true); $view = new ExportsSaveView($projectId, $data); $projectElements = $saveQuery->save($view); if (!$projectElements instanceof Exception) { $body['type'] = 'success'; $body['data'] = $projectElements; $respond->statusOK(); //DELETE THE CACHE IF WE HAVE, BECAUSE THE VALUE WAS CHANGED $cache = new FilesystemAdapter(); $cache->clear(); //END DELETING CACHE } else { $body['data'] = $projectElements->getMessage(); $respond->statusUnprocessableEntity(); } return $respond->createBody($body)->respond(); } }