private function updateClassContentDraft($type, $uid, $data)
    {
        $this->granted('VIEW', $content = $this->getClassContentByTypeAndUid($type, $uid));
        $this->granted('EDIT', $content);

        $operation = $data['operation'];
        if (!in_array($operation, ['commit', 'revert'])) {
            throw new BadRequestHttpException(sprintf('%s is not a valid operation for update draft.', $operation));
        }

        $this->getClassContentManager()->$operation($content, $data);

        return $content;
    }