summaryrefslogtreecommitdiffstats
path: root/library/Pdfexport/PrintStyleSheet.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Pdfexport/PrintStyleSheet.php')
-rw-r--r--library/Pdfexport/PrintStyleSheet.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/library/Pdfexport/PrintStyleSheet.php b/library/Pdfexport/PrintStyleSheet.php
new file mode 100644
index 0000000..71a235a
--- /dev/null
+++ b/library/Pdfexport/PrintStyleSheet.php
@@ -0,0 +1,25 @@
+<?php
+
+/* Icinga PDF Export | (c) 2021 Icinga GmbH | GPLv2 */
+
+namespace Icinga\Module\Pdfexport;
+
+use Icinga\Application\Icinga;
+use Icinga\Web\StyleSheet;
+
+class PrintStyleSheet extends StyleSheet
+{
+ protected function collect()
+ {
+ parent::collect();
+
+ $this->lessCompiler->setTheme(join(DIRECTORY_SEPARATOR, [
+ Icinga::app()->getModuleManager()->getModule('pdfexport')->getCssDir(),
+ 'print.less'
+ ]));
+
+ if (method_exists($this->lessCompiler, 'setThemeMode')) {
+ $this->lessCompiler->setThemeMode($this->pubPath . '/css/modes/none.less');
+ }
+ }
+}