summaryrefslogtreecommitdiffstats
path: root/library/Pdfexport/PrintStyleSheet.php
blob: 71a235a2b8378c75437a7f318b2b48decd8ded04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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');
        }
    }
}