icingaweb2/library/Icinga/Util/LessParser.php

24 lines
544 B
PHP
Raw Normal View History

<?php
/* Icinga Web 2 | (c) 2021 Icinga GmbH | GPLv2+ */
namespace Icinga\Util;
use Icinga\Less\Visitor;
use lessc;
require_once 'lessphp/lessc.inc.php';
class LessParser extends lessc
{
2022-02-09 21:32:50 +01:00
/**
* @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject
* light mode calls
*/
public function __construct($disableModes = false)
{
2022-02-09 21:32:50 +01:00
if (! $disableModes) {
$this->setOption('plugins', [new Visitor()]);
}
}
}