public function load(AbstractClassContent $content, BBUserToken $token = null, $checkoutOnMissing = false)
    {
        $revision = null;
        if (null !== $token) {
            $revision = $this->_em->getRepository('BackBee\ClassContent\Revision')->getDraft(
                $content,
                $token,
                $checkoutOnMissing
            );
        }

        if (false === $content->isLoaded()) {
            $classname = ClassUtils::getRealClass($content);
            if (null !== $refresh = $this->_em->find($classname, $content->getUid())) {
                $content = $refresh;
            }
        }

        $content->setDraft($revision);

        return $content;
    }
public function load(AbstractClassContent $content, BBUserToken $token = null, $checkoutOnMissing = false)
    {
        $revision = null;
        if (null !== $token) {
            $revision = $this->_em->getRepository('BackBee\ClassContent\Revision')->getDraft(
                $content,
                $token,
                $checkoutOnMissing
            );
        }

        if (false === $content->isLoaded()) {
            $classname = ClassUtils::getRealClass($content);
            if (null !== $refresh = $this->_em->find($classname, $content->getUid())) {
                $content = $refresh;
            }
        }

        $content->setDraft($revision);

        return $content;
    }
public function load ( AbstractClassContent $ content , BBUserToken $ token = null , $ checkoutOnMissing = false ) { $ revision = null ; if ( null !== $ token ) { $ revision = $ this -> _em -> getRepository ( 'BackBee\ClassContent\Revision' ) -> getDraft ( $ content , $ token , $ checkoutOnMissing ) ; } if ( false === $ content -> isLoaded ( ) ) { $ classname = ClassUtils :: getRealClass ( $ content ) ; if ( null !== $ refresh = $ this -> _em -> find ( $ classname , $ content -> getUid ( ) ) ) { $ content = $ refresh ; } } $ content -> setDraft ( $ revision ) ; return $ content ; }
Load content if need, the user's revision is also set.

@param  AbstractClassContent $content
@param  BBUserToken          $token
@param  boolean              $checkoutOnMissing If true, checks out a new revision if none was found
@return AbstractClassContent
Load content if need the user s revision is also set .