/** @var DirectoryIterator $directory */
foreach ($directories as $directory) { // Check valid directory
if ($directory->
isDot() || !
$directory->
isDir() ||
$directory->
getFilename() === '_cache'
) { continue;
} try { $theme =
$this->util->
getThemeByDirectory($directory);
} catch (Exception
$e) { continue;
} $data =
$this->
getThemeDefinition($theme);
$template =
$this->repository->
findOneBy([ 'template' =>
$theme->
getTemplate(),
]);
if (!
$template instanceof Template
) {