$repository =
$this->definitionRegistry->
getRepository($config->
getDefinition()->
getEntityName());
$associations =
$this->
getAssociations($template,
$repository->
getDefinition());
$criteria->
addAssociations($associations);
$criteria->
setLimit(50
);
/** @var RepositoryIterator<LandingPageCollection|CategoryCollection|ProductCollection> $iterator */
$iterator =
$context->
enableInheritance(static fn (Context
$context): RepositoryIterator =>
new RepositoryIterator($repository,
$context,
$criteria));
$this->
setTwigTemplate($config,
$template);
while ($entities =
$iterator->
fetch()) { yield from $this->
generateUrls($route,
$config,
$salesChannel,
$entities);
} } /**
* @param EntityCollection<Entity> $entities
*
* @return iterable<SeoUrlEntity>
*/