You are here

public function ThemeGenerator::removeUnusedLayout in AT Tools 8.3

Same name and namespace in other branches
  1. 8.2 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 352

Class

ThemeGenerator
Generator form.

Namespace

Drupal\at_theme_generator\Theme

Code

public function removeUnusedLayout() {
  if ($this->layout === 'flex') {
    $remove[] = 'page-layout-float';
    $remove[] = 'plugin-layout-float';
  }
  else {
    $remove[] = 'page-layout-flex';
    $remove[] = 'plugin-layout-flex';
  }
  foreach ($remove as $key => $value) {
    $this->directoryOperations
      ->directoryRemove($this->target . '/layout/' . $value);
  }
}