You are here

public function ThemeGenerator::removeUnusedLayout in AT Tools 8.2

Same name and namespace in other branches
  1. 8.3 at_theme_generator/src/Theme/ThemeGenerator.php \Drupal\at_theme_generator\Theme\ThemeGenerator::removeUnusedLayout()

Remove unused layout directory and files.

1 call to ThemeGenerator::removeUnusedLayout()
ThemeGeneratorTypes::starterkitGenerator in at_theme_generator/src/Theme/ThemeGeneratorTypes.php
Generate starter kit type theme.

File

at_theme_generator/src/Theme/ThemeGenerator.php, line 337

Class

ThemeGenerator
Generator form.

Namespace

Drupal\at_theme_generator\Theme

Code

public function removeUnusedLayout() {
  if ($this->layout === 'flex') {
    $layout_to_remove = 'site-builder';
    $layout_plugin_to_remove = 'layout_plugin_floats';
  }
  else {
    $layout_to_remove = 'flex-builder';
    $layout_plugin_to_remove = 'layout_plugin_flex';
  }
  $this->directoryOperations
    ->directoryRemove($this->target . '/layout/' . $layout_to_remove);
  $this->directoryOperations
    ->directoryRemove($this->target . '/styles/' . $layout_plugin_to_remove);
}