createSingleContentTypeUrl example

private function createUrls(Type $type): void
    {
        $shops = $this->getModelManager()->getRepository(Shop::class)->getActiveShopsFixed();
        $seoIndexer = $this->get('seoindex');

        $rewriteTable = $this->get('modules')->RewriteTable();

        foreach ($shops as $shop) {
            $seoIndexer->registerShop($shop->getId());

            $rewriteTable->baseSetup();
            $rewriteTable->createSingleContentTypeUrl($type);
        }
    }

    /** * @return list<array{name: string, url: string}> */
    private function getUrls(Type $type): array
    {
        $shops = $this->getModelManager()->getRepository(Shop::class)->getActiveShopsFixed();

        $urls = [];

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