/**
* Helper function which resolves the theme parent for each
* passed theme
*
* @throws Exception
*/
private function setParents(array
$themes) { /** @var Theme $theme */
foreach ($themes as $theme) { if ($theme->
getExtend() === null
) { continue;
} $template =
$this->repository->
findOneBy([ 'template' =>
$theme->
getTemplate(),
]);
if (!
$template instanceof Template
) { throw new Exception(sprintf('Template of theme %s not found',
$theme->
getTemplate()));
} $parent =
$this->repository->
findOneBy([