Beispiel #1
0
 /**
  * 
  */
 public function doDeleteBgImage()
 {
     $path = $this->getConfig()->getDataPath() . $this->setup->pdfBgImage;
     if (is_file($path)) {
         \Tk\Path::rmdir(dirname($path));
         $this->setup->pdfBgImage = '';
         $this->setup->save();
     }
     $this->getUri()->delete('delBgImage')->redirect();
 }
Beispiel #2
0
 /**
  *
  */
 public function doPrevCert()
 {
     $filter = $this->table->getFilterValues();
     $image = $this->setup->getPdfBgImageUrl()->toString();
     $dateFrom = $filter['dateFrom']->floor()->toString(\Tk\Date::LONG_DATE);
     $dateTo = $filter['dateTo']->ceil()->toString(\Tk\Date::LONG_DATE);
     $tpl = $this->setup->pdfContent;
     $obj = current($this->getList(true));
     $dompdf = $this->makeCert($obj, $dateFrom, $dateTo, $image, $tpl);
     $dompdf->stream('coaPreview.pdf');
     exit;
 }