public function checkout(AbstractClassContent $content, BBUserToken $token)
 {
     $revision = new Revision();
     $revision->setAccept($content->getAccept());
     $revision->setContent($content);
     $revision->setData($content->getDataToObject());
     $revision->setLabel($content->getLabel());
     $maxEntry = (array) $content->getMaxEntry();
     $minEntry = (array) $content->getMinEntry();
     $revision->setMaxEntry($maxEntry);
     $revision->setMinEntry($minEntry);
     $revision->setOwner($token->getUser());
     foreach ($content->getAllParams() as $key => $value) {
         if (null !== $content->getParamValue($key)) {
             $revision->setParam($key, $content->getParamValue($key));
         }
     }
     $revision->setRevision($content->getRevision() ? $content->getRevision() : 0);
     $revision->setState($content->getRevision() ? Revision::STATE_MODIFIED : Revision::STATE_ADDED);
     return $revision;
 }