private function executeRevert(AbstractClassContent $content, Revision $draft, array $data)
    {
        $content->setDraft(null);
        if ($content instanceof ContentSet) {
            if (isset($data['elements']) && true === $data['elements']) {
                $draft->clear();
                foreach ($content->getData() as $element) {
                    if ($element instanceof AbstractClassContent) {
                        $draft->push($element);
                    }
                }
            }
        } else {
            foreach ($content->getData() as $key => $element) {
                if (isset($data['elements']) && in_array($key, $data['elements'])) {
                    $draft->$key = $content->$key;
                }

                if (in_array('Element\Keyword', $content->getAccept()[$key])) {
                    $this->entityManager
                        ->getRepository('BackBee\ClassContent\Element\Keyword')
                        ->cleanKeywordLinks($content, $element);
                }
            }
        }

        if (isset($data['parameters'])) {
            foreach ($content->getDefaultParams() as $key => $params) {
                if (in_array($key, $data['parameters'])) {
                    $draft->setParam($key, $content->getParamValue($key));
                }
            }
        }

        return $this;
    }