public function generateRepository($packageKey, $modelName, $overwrite = false)
    {
        list($baseNamespace, $namespaceEntryPath) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey));
        $modelName = ucfirst($modelName);
        $repositoryClassName = $modelName . 'Repository';
        $namespace = trim($baseNamespace, '\\') . '\\Domain\\Repository';

        $templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/Repository/RepositoryTemplate.php.tmpl';

        $contextVariables = [];
        $contextVariables['packageKey'] = $packageKey;
        $contextVariables['modelName'] = $modelName;
        $contextVariables['repositoryClassName'] = $repositoryClassName;
        $contextVariables['namespace'] = $namespace;

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

        $repositoryFilename = $repositoryClassName . '.php';
        $repositoryPath = Files::concatenatePaths([$namespaceEntryPath, 'Domain/Repository']) . '/';
        $targetPathAndFilename = $repositoryPath . $repositoryFilename;

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

        return $this->generatedFiles;
    }