public function generateView($packageKey, $subpackage, $controllerName, $viewName, $templateName, $overwrite = false)
    {
        list($baseNamespace) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey));
        $viewName = ucfirst($viewName);

        $templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/View/' . $templateName . 'Template.html';

        $contextVariables = [];
        $contextVariables['packageKey'] = $packageKey;
        $contextVariables['subpackage'] = $subpackage;
        $contextVariables['isInSubpackage'] = ($subpackage != '');
        $contextVariables['controllerName'] = $controllerName;
        $contextVariables['viewName'] = $viewName;
        $contextVariables['modelName'] = strtolower($controllerName[0]) . substr($controllerName, 1);
        $contextVariables['repositoryClassName'] = '\\' . trim($baseNamespace, '\\') . ($subpackage != '' ? '\\' . $subpackage : '') . '\Domain\Repository\\' . $controllerName . 'Repository';
        $contextVariables['modelFullClassName'] = '\\' . trim($baseNamespace, '\\') . ($subpackage != '' ? '\\' . $subpackage : '') . '\Domain\Model\\' . $controllerName;
        $contextVariables['modelClassName'] = ucfirst($contextVariables['modelName']);

        $modelClassSchema = $this->reflectionService->getClassSchema($contextVariables['modelFullClassName']);
        if ($modelClassSchema !== null) {
            $contextVariables['properties'] = $modelClassSchema->getProperties();
            if (isset($contextVariables['properties']['Persistence_Object_Identifier'])) {
                unset($contextVariables['properties']['Persistence_Object_Identifier']);
            }
        }

        if (!isset($contextVariables['properties']) || $contextVariables['properties'] === []) {
            $contextVariables['properties'] = ['name' => ['type' => 'string']];
        }

        $fileContent = $this->renderTemplate($templatePathAndFilename, $contextVariables);

        $subpackagePath = $subpackage != '' ? $subpackage . '/' : '';
        $viewFilename = $viewName . '.html';
        $viewPath = 'resource://' . $packageKey . '/Private/Templates/' . $subpackagePath . $controllerName . '/';
        $targetPathAndFilename = $viewPath . $viewFilename;

        $this->generateFile($targetPathAndFilename, $fileContent, $overwrite);

        return $this->generatedFiles;
    }