public function ScssCompilerPluginBase::__construct in SCSS/Less Compiler 8
Constructs a SCSS Compiler base plugin.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\scss_compiler\ScssCompilerInterface $scss_compiler: The scss compiler service.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\File\FileSystemInterface $file_system: The file system service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
Overrides PluginBase::__construct
File
- src/
ScssCompilerPluginBase.php, line 68
Class
- ScssCompilerPluginBase
- Defines base abstract class for ScssCompiler plugins.
Namespace
Drupal\scss_compilerCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, ScssCompilerInterface $scss_compiler, RequestStack $request_stack, FileSystemInterface $file_system, ModuleHandlerInterface $module_handler) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->scssCompiler = $scss_compiler;
$this->request = $request_stack
->getCurrentRequest();
$this->fileSystem = $file_system;
$this->moduleHandler = $module_handler;
$this
->init();
}