You are here

private function ScssphpCompiler::getScssPhpFormatClass in SCSS/Less Compiler 8

Returns ScssPhp Compiler format classname.

Parameters

string $format: Format name.

Return value

string Format type classname.

1 call to ScssphpCompiler::getScssPhpFormatClass()
ScssphpCompiler::init in src/Plugin/ScssCompiler/ScssphpCompiler.php
Calls a code on plugin initialization.

File

src/Plugin/ScssCompiler/ScssphpCompiler.php, line 210

Class

ScssphpCompiler
Plugin implementation of the Scss compiler.

Namespace

Drupal\scss_compiler\Plugin\ScssCompiler

Code

private function getScssPhpFormatClass($format) {
  switch ($format) {
    case 'expanded':
      return '\\ScssPhp\\ScssPhp\\Formatter\\Expanded';
    case 'nested':
      return '\\ScssPhp\\ScssPhp\\Formatter\\Nested';
    case 'compact':
      return '\\ScssPhp\\ScssPhp\\Formatter\\Compact';
    case 'crunched':
      return '\\ScssPhp\\ScssPhp\\Formatter\\Crunched';
    default:
      return '\\ScssPhp\\ScssPhp\\Formatter\\Compressed';
  }
}