if (!
is_writable($this->pathResolver->
getFrontendThemeDirectory())) { throw new Exception(sprintf('Theme directory %s isn\'t writable',
$this->pathResolver->
getFrontendThemeDirectory()));
} if (!
isset($data['template'
]) ||
empty($data['template'
])) { throw new Exception('Passed data array contains no valid theme name under the array key "template".'
);
} // Ensure that the first character is upper case.
// Required for the directory structure and php namespace
$data['template'
] =
ucfirst($data['template'
]);
$this->
createThemeDirectory($data['template'
]);
$this->
generateThemePhp($data,
$parent);
$directory =
$this->
getThemeDirectory($data['template'
]);
$this->
generateStructure( $this->structure,
$directory );
$this->eventManager->
notify('Theme_Generator_Structure_Generated',
[ 'data' =>
$data,