Example #1
0
 /**
  * Overriding parent to add param2 to templates text.
  *
  * @return string
  */
 protected function get_templates_text()
 {
     $text = parent::get_templates_text();
     $text .= $this->param2 ? ' ' . $this->param2 : '';
     return trim($text);
 }
Example #2
0
 /**
  * Override parent to remove pdf bookmark tags.
  */
 public function display(array $options = array())
 {
     /* Export */
     if (!empty($options['export'])) {
         // Remove export excluded patterns from templates.
         if ($noexportpatterns = $this->pdf_settings->noexportpatterns) {
             foreach ($this->editors as $editorname) {
                 $this->{$editorname} = str_replace($noexportpatterns, '', $this->{$editorname});
             }
         }
         return parent::display($options);
     }
     // For display we need to clean up the bookmark patterns.
     foreach ($this->editors as $editorname) {
         $this->{$editorname} = preg_replace("%#@PDF-[G]*BM:\\d+:[^@]*@#%", '', $this->{$editorname});
     }
     return parent::display($options);
 }