Provide a method to generate PDF CSS
This commit is contained in:
parent
c5ad14e781
commit
e930df4c54
|
@ -22,6 +22,18 @@ class StyleSheet
|
||||||
'css/icinga/login.less',
|
'css/icinga/login.less',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public static function compileForPdf()
|
||||||
|
{
|
||||||
|
$less = new LessCompiler();
|
||||||
|
$basedir = Icinga::app()->getBootstrapDirecory();
|
||||||
|
foreach (self::$lessFiles as $file) {
|
||||||
|
$less->addFile($basedir . '/' . $file);
|
||||||
|
}
|
||||||
|
$less->addLoadedModules();
|
||||||
|
$less->addFile($basedir . '/css/pdf/pdfprint.less');
|
||||||
|
return $less->compile();
|
||||||
|
}
|
||||||
|
|
||||||
public static function send()
|
public static function send()
|
||||||
{
|
{
|
||||||
header('Content-Type: text/css');
|
header('Content-Type: text/css');
|
||||||
|
|
Loading…
Reference in New Issue