You are here

class ScssCompilerCommands in SCSS/Less Compiler 8

ScssCompiler drush commands.

Hierarchy

Expanded class hierarchy of ScssCompilerCommands

1 string reference to 'ScssCompilerCommands'
drush.services.yml in ./drush.services.yml
drush.services.yml
1 service uses ScssCompilerCommands
scss_compiler.commands in ./drush.services.yml
\Drupal\scss_compiler\Commands\ScssCompilerCommands

File

src/Commands/ScssCompilerCommands.php, line 11

Namespace

Drupal\scss_compiler\Commands
View source
class ScssCompilerCommands extends DrushCommands {

  /**
   * Scss compiler service.
   *
   * @var \Drupal\scss_compiler\ScssCompilerInterface
   */
  protected $scssCompiler;

  /**
   * ScssCompilerCommands constructor.
   *
   * @param \Drupal\scss_compiler\ScssCompilerInterface $scss_compiler
   *   ScssCompiler service.
   */
  public function __construct(ScssCompilerInterface $scss_compiler) {
    parent::__construct();
    $this->scssCompiler = $scss_compiler;
  }

  /**
   * Flush compiler cache.
   *
   * @command compiler:cr
   * @usage drush ccr.
   * @aliases ccr.
   */
  public function flushCache() {
    $this->scssCompiler
      ->flushCache();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ScssCompilerCommands::$scssCompiler protected property Scss compiler service.
ScssCompilerCommands::flushCache public function Flush compiler cache.
ScssCompilerCommands::__construct public function ScssCompilerCommands constructor.