public function ThemeGeneratorTypes::skinGenerator in AT Tools 8.3
Same name and namespace in other branches
- 8.2 at_theme_generator/src/Theme/ThemeGeneratorTypes.php \Drupal\at_theme_generator\Theme\ThemeGeneratorTypes::skinGenerator()
Generate skin type theme.
File
- at_theme_generator/
src/ Theme/ ThemeGeneratorTypes.php, line 209
Class
- ThemeGeneratorTypes
- Generate themes by type.
Namespace
Drupal\at_theme_generator\ThemeCode
public function skinGenerator() {
// Copy source.
$this
->copySource();
// Yml files.
$yml_files = [
'libraries',
'info',
];
$this
->renameYmlFiles($yml_files);
// Stylesheets and library.
$this
->processSkinStyles('SKIN');
// Remove SCSS if base theme does not support it.
$skin_base_path = drupal_get_path('theme', $this->skin_base);
if (!file_exists($skin_base_path . '/Gruntfile.js')) {
$this
->removeScss();
$this
->removeScssTools();
}
// Logos
$this
->replaceSkinLogos();
// Description
$desc['text'] = $this->description;
$desc['base'] = $this->skin_base . ' (' . $this->base_theme_info['base theme original'] . ')';
$desc['time'] = $this->datetime;
$desc['skin'] = $this->skin_base;
// Info
$info['name'] = "{$this->friendly_name}";
$info['version'] = $this->version;
$info['type'] = "theme";
$info['base theme'] = $this->skin_base;
$info['base theme original'] = $this->base_theme_info['base theme original'];
$info['subtheme type'] = 'adaptive_skin';
$info['layout'] = $this->base_theme_info['layout'];
$info['description'] = $this
->infoYmlDescription($desc);
$info['core'] = '8.x';
$info['regions'] = $this->base_theme_info['regions'];
$info['tags'] = 'adaptivetheme sub-theme';
$info['features'] = $this->info['features'];
$info['libraries'] = [
$this->machine_name . '/skin',
];
$this
->infoYml($info);
}