Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit 5119424

Browse files
authored
Routes update (#3796)
* Regenerated using latest generator * Regenerated using latest generator * Regenerated using latest generator * Regenerated using latest generator * Regenerated using latest generator * Regenerated using latest generator
1 parent 9d0931e commit 5119424

File tree

3 files changed

+2
-56
lines changed

3 files changed

+2
-56
lines changed

src/system/RoutesModule/Base/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @author Zikula contributors <support@zikula.org>.
88
* @link http://www.zikula.org
99
* @link http://zikula.org
10-
* @version Generated by ModuleStudio 1.0.1 (https://modulestudio.de) at Wed Aug 30 15:50:40 CEST 2017.
10+
* @version Generated by ModuleStudio 1.0.1 (https://modulestudio.de) at Thu Aug 31 12:47:48 CEST 2017.
1111
*/
1212

1313
/**

src/system/RoutesModule/Helper/Base/AbstractViewHelper.php

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@ public function processTemplate($type, $func, array $templateParameters = [], $t
142142
$template = $this->getViewTemplate($type, $func);
143143
}
144144

145-
if ($templateExtension == 'pdf.twig') {
146-
$template = str_replace('.pdf', '.html', $template);
147-
148-
return $this->processPdf($templateParameters, $template);
149-
}
150-
151145
// look whether we need output with or without the theme
152146
$raw = $this->request->query->getBoolean('raw', false);
153147
if (!$raw && $templateExtension != 'html.twig') {
@@ -219,52 +213,4 @@ public function availableExtensions($type, $func)
219213

220214
return $extensions;
221215
}
222-
223-
/**
224-
* Processes a template file using dompdf (LGPL).
225-
*
226-
* @param array $templateParameters Template data
227-
* @param string $template Name of template to use
228-
*
229-
* @return mixed Output
230-
*/
231-
protected function processPdf(array $templateParameters = [], $template)
232-
{
233-
// first the content, to set page vars
234-
$output = $this->twig->render($template, $templateParameters);
235-
236-
// make local images absolute
237-
$output = str_replace('img src="/', 'img src="' . $this->request->server->get('DOCUMENT_ROOT') . '/', $output);
238-
239-
// then the surrounding
240-
$output = $this->twig->render('@ZikulaRoutesModule/includePdfHeader.html.twig') . $output . '</body></html>';
241-
242-
// create name of the pdf output file
243-
$siteName = $this->variableApi->getSystemVar('sitename');
244-
$pageTitle = iconv('UTF-8', 'ASCII//TRANSLIT', $this->pageVars->get('title', ''));
245-
$fileTitle = iconv('UTF-8', 'ASCII//TRANSLIT', $siteName)
246-
. '-'
247-
. ($pageTitle != '' ? $pageTitle . '-' : '')
248-
. date('Ymd') . '.pdf';
249-
$fileTitle = str_replace(' ', '_', $fileTitle);
250-
251-
/*
252-
if (true === $this->request->query->getBoolean('dbg', false)) {
253-
die($output);
254-
}
255-
*/
256-
257-
// instantiate pdf object
258-
$pdf = new \Dompdf\Dompdf();
259-
// define page properties
260-
$pdf->setPaper('A4', 'portrait');
261-
// load html input data
262-
$pdf->loadHtml($output);
263-
// create the actual pdf file
264-
$pdf->render();
265-
// stream output to browser
266-
$pdf->stream($fileTitle);
267-
268-
return new Response();
269-
}
270216
}

src/system/RoutesModule/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @author Zikula contributors <support@zikula.org>.
88
* @link http://www.zikula.org
99
* @link http://zikula.org
10-
* @version Generated by ModuleStudio 1.0.1 (https://modulestudio.de) at Wed Aug 30 15:50:40 CEST 2017.
10+
* @version Generated by ModuleStudio 1.0.1 (https://modulestudio.de) at Thu Aug 31 12:47:48 CEST 2017.
1111
*/
1212

1313
/**

0 commit comments

Comments
 (0)