generateUrls example

$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> */
    private function generateUrls(SeoUrlRouteInterface $seoUrlRoute, SeoUrlRouteConfig $config, SalesChannelEntity $salesChannel, EntityCollection $entities): iterable
    {
        $request = $this->requestStack->getMainRequest();

        
Home | Imprint | This part of the site doesn't use cookies.