/**
  * Apply a single history entry to the plugin's history. 
  * 
  * @param SeguePluginsAPI $plugin
  * @param object DOMElement $element
  * @return void
  * @access protected
  * @since 1/23/08
  */
 protected function addPluginHistoryEntry(SeguePluginsAPI $plugin, DOMElement $element)
 {
     foreach ($element->childNodes as $child) {
         if ($child->nodeType == XML_ELEMENT_NODE && $child->nodeName != 'comment') {
             $doc = new Harmoni_DOMDocument();
             $doc->appendChild($doc->importNode($child, true));
             break;
         }
     }
     if (!isset($doc)) {
         throw new Exception("No version found.");
     }
     $comment = $this->getPluginHistoryComment($element);
     $timestamp = $this->getPluginHistoryTimestamp($element);
     $agentId = $this->getPluginHistoryAgentId($element);
     $plugin->importVersion($doc, $agentId, $timestamp, $comment);
 }
 /**
  * Answer a history link for a block
  * 
  * 
  * @param object BlockSiteComponent $block
  * @return void
  * @access public
  * @since 1/10/08
  */
 public function getHistoryLink(BlockSiteComponent $block, SeguePluginsAPI $plugin)
 {
     ob_start();
     if ($plugin->supportsVersioning() && $block->showHistory() && !$this->isHeaderOrFooter($block)) {
         print "\n<div class='history'>";
         print "\n\t<a href='" . $this->getHistoryUrl($block->getId()) . "'>";
         print _("History");
         print "</a>";
         print "\n</div>";
     }
     return ob_get_clean();
 }