Esempio n. 1
0
 /**
  * Restore the document to the state it was before
  *
  * @param string  $documentVersion the version name to restore
  * @param boolean $removeExisting  how to handle identifier collisions
  *
  * @see VersionManager::restore
  */
 public function restoreVersion($documentVersion, $removeExisting)
 {
     $oid = spl_object_hash($documentVersion);
     $history = $this->documentHistory[$oid];
     $version = $this->documentVersion[$oid];
     $document = $this->dm->find(null, $history->getVersionableIdentifier());
     $vm = $this->session->getWorkspace()->getVersionManager();
     $vm->restore($removeExisting, $version);
     $this->dm->refresh($document);
 }
 /**
  * {@inheritDoc}
  */
 public function refresh($document)
 {
     $this->wrapped->refresh($document);
 }
 /**
  * Refresh a document with the data from PHPCR.
  *
  * @param  object $document
  */
 public function refresh($document)
 {
     $this->dm->refresh($document);
 }