$directory =
$bundlePath . '/Resources/views';
if (!
file_exists($directory)) { continue;
} $bundles[$bundle->
getName()] =
$bundle->
getTemplatePriority();
} $bundles =
array_reverse($bundles);
$apps =
$this->
getAppTemplateNamespaces();
/** @var array<int, array<string, mixed>> $combinedApps */
$combinedApps =
array_combine(array_keys($apps),
array_column($apps, 'template_load_priority'
));
$extensions =
array_merge($combinedApps,
$bundles);
asort($extensions);
foreach ($apps as $appName =>
['version' =>
$version]) { $extensions[$appName] =
$version;
}