public function ThemeGenerator::renameGeneratedCssFiles in AT Tools 8.2
Same name and namespace in other branches
- 8.3 at_theme_generator/src/Theme/ThemeGenerator.php \Drupal\at_theme_generator\Theme\ThemeGenerator::renameGeneratedCssFiles()
Rename this themes generated CSS files.
2 calls to ThemeGenerator::renameGeneratedCssFiles()
- ThemeGeneratorTypes::cloneGenerator in at_theme_generator/
src/ Theme/ ThemeGeneratorTypes.php - Generate clone type theme.
- ThemeGeneratorTypes::starterkitGenerator in at_theme_generator/
src/ Theme/ ThemeGeneratorTypes.php - Generate starter kit type theme.
File
- at_theme_generator/
src/ Theme/ ThemeGenerator.php, line 322
Class
- ThemeGenerator
- Generator form.
Namespace
Drupal\at_theme_generator\ThemeCode
public function renameGeneratedCssFiles() {
$generated_css_files = $this
->getGeneratedCssFiles();
$generated_css_files_path = $this->target . '/styles/css/generated/';
foreach ($generated_css_files as $old_css_file) {
$new_css_file = str_replace($this->source['name'], $this->machine_name, $old_css_file);
$this->fileOperations
->fileRename($generated_css_files_path . '/' . $old_css_file, $generated_css_files_path . '/' . $new_css_file);
}
}