Contao\Combiner::handleScssLess PHP Метод

handleScssLess() защищенный Метод

Handle SCSS/LESS files
protected handleScssLess ( string $content, array $arrFile ) : string
$content string The file content
$arrFile array The file array
Результат string The modified file content
    protected function handleScssLess($content, $arrFile)
    {
        if ($arrFile['extension'] == self::SCSS) {
            $objCompiler = new Compiler();
            $objCompiler->setImportPaths(array(TL_ROOT . '/' . dirname($arrFile['name']), TL_ROOT . '/vendor/contao-components/compass/css'));
            $objCompiler->setFormatter(\Config::get('debugMode') ? 'Leafo\\ScssPhp\\Formatter\\Expanded' : 'Leafo\\ScssPhp\\Formatter\\Compressed');
            return $this->fixPaths($objCompiler->compile($content), $arrFile);
        } else {
            $strPath = dirname($arrFile['name']);
            $arrOptions = array('strictMath' => true, 'compress' => !\Config::get('debugMode'), 'import_dirs' => array(TL_ROOT . '/' . $strPath => $strPath));
            $objParser = new \Less_Parser();
            $objParser->SetOptions($arrOptions);
            $objParser->parse($content);
            return $this->fixPaths($objParser->getCss(), $arrFile);
        }
    }