You are here

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

Path to where we will save the theme and perform generator operations.

Return value

string

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

File

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

Class

ThemeGenerator
Generator form.

Namespace

Drupal\at_theme_generator\Theme

Code

public function targetDirectory() {
  if ($this->dir_option === 'custom') {
    $target_dir = $this->dir_option_custom;
  }
  elseif ($this->dir_option === 'public://') {
    $target_path = 'public://generated_themes';
    $target_dir = $this->directoryOperations
      ->directoryPrepare([
      $target_path,
    ]);
  }
  else {
    $target_dir = 'themes';
  }
  return $target_dir . '/' . $this->machine_name;
}