public function setPublishedRevision(Revision $revision)
    {
        if (!empty($this->stagedRevision)) {
            $this->removeStagedRevision();
        }

        $revision->publishRevision();
        $this->publishedRevision = $revision;
        $this->publishedRevisionId = $revision->getRevisionId();
        $this->setLastPublished(new \DateTime());
    }
public function setPublishedRevision(Revision $revision)
    {
        if (!empty($this->stagedRevision)) {
            $this->removeStagedRevision();
        }

        $revision->publishRevision();
        $this->publishedRevision = $revision;
        $this->publishedRevisionId = $revision->getRevisionId();
        $this->setLastPublished(new \DateTime());
    }
public function setPublishedRevision ( Revision $ revision ) { if ( ! empty ( $ this -> stagedRevision ) ) { $ this -> removeStagedRevision ( ) ; } $ revision -> publishRevision ( ) ; $ this -> publishedRevision = $ revision ; $ this -> publishedRevisionId = $ revision -> getRevisionId ( ) ; $ this -> setLastPublished ( new \ DateTime ( ) ) ; }
Set the published published revision for the page

@param Revision $revision Revision object to add

@return void
Set the published published revision for the page