You are here

public function ThemeGenerator::sourceTheme 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::sourceTheme()

Return the source theme name to use in string operations and the path to the source theme.

Return value

array

1 call to ThemeGenerator::sourceTheme()
ThemeGenerator::__construct in at_theme_generator/src/Theme/ThemeGenerator.php
Generator constructor.

File

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

Class

ThemeGenerator
Generator form.

Namespace

Drupal\at_theme_generator\Theme

Code

public function sourceTheme() {
  $source = [];
  if ($this->sub_theme_type === 'clone') {
    $source['name'] = $this->clone_source;
    $source['path'] = drupal_get_path('theme', $this->clone_source);
  }
  else {
    $source['name'] = strtoupper($this->sub_theme_type);
    $source['path'] = drupal_get_path('module', 'at_theme_generator') . '/starterkits/' . $this->sub_theme_type;
  }
  return $source;
}