public function putCollectionAction(Request $request)
    {
        $result = [];
        foreach ($request->request->all() as $data) {
            if (!isset($data['type']) || !isset($data['uid'])) {
                throw new BadRequestHttpException("type and/or uid is missing.");
            }

            try {
                $content = $this->updateClassContent($data['type'], $data['uid'], $data);
                $this->granted('VIEW', $content);
                $this->granted('EDIT', $content);

                $result[] = [
                    'uid'        => $content->getUid(),
                    'type'       => $content->getContentType(),
                    'statusCode' => 200,
                    'message'    => 'OK',
                ];
            } catch (AccessDeniedException $e) {
                $result[] = [
                    'uid'        => $data['uid'],
                    'type'       => $data['type'],
                    'statusCode' => 401,
                    'message'    => $e->getMessage(),
                ];
            } catch (\Exception $e) {
                $result[] = [
                    'uid'        => $data['uid'],
                    'type'       => $data['type'],
                    'statusCode' => 500,
                    'message'    => $e->getMessage(),
                ];
            }
        }

        $this->getEntityManager()->flush();

        return $this->createJsonResponse($result);
    }