You are here

public function ScssCompilerService::getAdditionalImportPaths in SCSS/Less Compiler 8

Returns additional import paths.

Return value

array An array with additional paths.

Overrides ScssCompilerInterface::getAdditionalImportPaths

See also

hook_scss_compiler_import_paths_alter()

File

src/ScssCompilerService.php, line 396

Class

ScssCompilerService
Defines a class for scss compiler service.

Namespace

Drupal\scss_compiler

Code

public function getAdditionalImportPaths() {
  if (isset($this->additionalImportPaths)) {
    return $this->additionalImportPaths;
  }
  $this->additionalImportPaths = [];
  $this->moduleHandler
    ->alter('scss_compiler_import_paths', $this->additionalImportPaths);
  $activeTheme = $this->themeManager
    ->getActiveTheme();
  $this->themeManager
    ->alterForTheme($activeTheme, 'scss_compiler_import_paths', $this->additionalImportPaths);
  if (!is_array($this->additionalImportPaths)) {
    $this->additionalImportPaths = [];
  }
  return $this->additionalImportPaths;
}