public function getRevisionById($revisionId)
    {
        $revision = $this->revisions->get($revisionId);

        if ($revision !== null) {
            return $revision; //We get here when rendering an unpublished page version
        }

        foreach ($this->revisions as $revision) {
            if ($revision->getRevisionId() === $revisionId) {
                return $revision; //We get here when publishing a new page version
            }
        }

        return null;
    }
public function getRevisionById($revisionId)
    {
        $revision = $this->revisions->get($revisionId);

        if ($revision !== null) {
            return $revision; //We get here when rendering an unpublished page version
        }

        foreach ($this->revisions as $revision) {
            if ($revision->getRevisionId() === $revisionId) {
                return $revision; //We get here when publishing a new page version
            }
        }

        return null;
    }
public function getRevisionById ( $ revisionId ) { $ revision = $ this -> revisions -> get ( $ revisionId ) ; if ( $ revision !== null ) { return $ revision ; //We get here when rendering an unpublished page version } foreach ( $ this -> revisions as $ revision ) { if ( $ revision -> getRevisionId ( ) === $ revisionId ) { return $ revision ; //We get here when publishing a new page version } } return null ; }
Get a page revision by ID

@param int $revisionId

@return null|Revision
Get a page revision by ID