public function renderVersion($context)
 {
     $section = $context['section'];
     $entry = $context['entry'];
     $fields = $context['fields'];
     $entry_id = $entry->get('id');
     $version = $_GET['version'];
     if (!isset($version)) {
         return false;
     }
     if ($entry) {
         $context['entry'] = EntryVersionsManager::unserializeEntry($entry_id, $version);
     }
 }
 public function appendFormattedElement(&$wrapper, $data, $encode = false, $mode = null)
 {
     $entry_id = $wrapper->getAttribute('id');
     $versions = new XMLElement('versions');
     $entries = EntryVersionsManager::entryHistory($entry_id);
     foreach ($entries as $entry) {
         $versions->appendChild(DOMConverter::toXMLElement($entry));
     }
     $wrapper->appendChild($versions);
 }