public function installTheme()
{
try {
$this->full_path = $this->extractToTemporary();
$success = $this->getAndCheckConfig();
$this->copyFiles();
$this->copyScreenshot();
$theme = Theme::create(array('name' => $this->config['name'], 'version' => $this->config['version'], 'author' => $this->config['author'], 'description' => $this->config['description'], 'directory' => $this->config['directory'], 'screenshot' => $this->screenshot, 'target' => $this->target, 'has_settings' => $this->has_settings));
$this->installModules();
if ($this->install_sample_data) {
$this->installSampleData($theme);
}
$this->cleanup();
return $this->listener->installerSucceeds('backend/theme-manager', 'The theme was installed successfully');
} catch (Exception $e) {
return $this->listener->installerFails($e->getMessage());
}
}