protected function generateSitesXml($packageKey, $siteName)
{
$templatePathAndFilename = 'resource://Neos.SiteKickstarter/Private/Generator/Content/Sites.xml';
$contextVariables = array();
$contextVariables['packageKey'] = $packageKey;
$contextVariables['siteName'] = htmlspecialchars($siteName);
$packageKeyDomainPart = substr(strrchr($packageKey, '.'), 1) ?: $packageKey;
$contextVariables['siteNodeName'] = strtolower($packageKeyDomainPart);
$contextVariables['dimensions'] = $this->contentDimensionRepository->findAll();
$fileContent = $this->renderTemplate($templatePathAndFilename, $contextVariables);
$sitesXmlPathAndFilename = $this->packageManager->getPackage($packageKey)->getResourcesPath() . 'Private/Content/Sites.xml';
$this->generateFile($sitesXmlPathAndFilename, $fileContent);
}