Esempio n. 1
0
 /**
  * Stops renderer output capture and renders the reference link
  */
 private function renderReference($renderer, $attributes, $data)
 {
     $reference = refnotes_renderer_core::getInstance()->addReference($attributes, $data);
     $text = $this->noteCapture->stop();
     if ($text != '') {
         $reference->getNote()->setText($text);
     }
     $renderer->doc .= $reference->render();
 }
Esempio n. 2
0
 /**
  *
  */
 private function renderNotes($renderer, $attribute)
 {
     $limit = array_key_exists('limit', $attribute) ? $attribute['limit'] : '';
     $html = refnotes_renderer_core::getInstance()->renderNotes($attribute['ns'], $limit);
     if ($html != '') {
         $renderer->doc .= '<div class="refnotes">' . DOKU_LF;
         $renderer->doc .= $html;
         $renderer->doc .= '</div>' . DOKU_LF;
     }
 }
Esempio n. 3
0
 /**
  * Renderer core is used by both references and notes syntax plugins during the rendering
  * stage. The instance has to be shared between the plugins, and since there should be no
  * more than one rendering pass during a DW page request, a single instance of the syntax
  * core should be enough.
  */
 public static function getInstance()
 {
     if (self::$instance == NULL) {
         self::$instance = new refnotes_renderer_core();
     }
     return self::$instance;
 }