sCreateRewriteTableCampaigns example

do {
                $lastUpdateVal = $this->rewriteTable->sCreateRewriteTableArticles($lastUpdateVal$limit);
                $lastId = $this->rewriteTable->getRewriteArticleslastId();
            } while ($lastId !== null);

            $this->seoIndex->setCachedTime($currentTime->format('Y-m-d H:i:s')$elementId$shopId);

            $context = $this->container->get(ContextServiceInterface::class)->createShopContext($shopId);

            $this->rewriteTable->sCreateRewriteTableCategories();
            $this->rewriteTable->sCreateRewriteTableCampaigns();
            $this->rewriteTable->sCreateRewriteTableContent();
            $this->rewriteTable->sCreateRewriteTableBlog(null, null, $context);
            $this->rewriteTable->createManufacturerUrls($context);
            $this->rewriteTable->sCreateRewriteTableStatic();
            $this->rewriteTable->createContentTypeUrls($context);

            $this->events->notify(
                'Shopware_Command_RebuildSeoIndexCommand_CreateRewriteTable',
                [
                    'shopContext' => $context,
                    'cachedTime' => $currentTime,
                ]
set_time_limit(1200);
        $offset = $this->Request()->getParam('offset', 0);
        $limit = $this->Request()->getParam('limit', 50);
        $shopId = (int) $this->Request()->getParam('shopId', 1);

        // Create shop         $shop = $this->SeoIndex()->registerShop($shopId);

        // Make sure a template is available         $this->RewriteTable()->baseSetup();

        $this->RewriteTable()->sCreateRewriteTableCampaigns($offset$limit);

        $this->View()->assign([
            'success' => true,
        ]);
    }

    /** * Create SEO links for CMS/tickets */
    public function seoContentAction()
    {
        @

    public function sCreateRewriteTable($lastUpdate)
    {
        $this->baseSetup();

        $context = $this->contextService->createShopContext(Shopware()->Shop()->getId());

        $this->sCreateRewriteTableCleanup();
        $this->sCreateRewriteTableStatic();
        $this->sCreateRewriteTableCategories();
        $this->sCreateRewriteTableBlog(null, null, $context);
        $this->sCreateRewriteTableCampaigns();
        $lastUpdate = $this->sCreateRewriteTableArticles($lastUpdate);
        $this->sCreateRewriteTableContent(null, null, $context);
        $this->createManufacturerUrls($context);
        $this->createContentTypeUrls($context);

        return $lastUpdate;
    }

    /** * Cleanup the rewrite table from non-existing resources. * * @throws Zend_Db_Adapter_Exception */
do {
                $lastUpdateVal = $this->RewriteTable()->sCreateRewriteTableArticles($lastUpdateVal$limit);
                $lastId = $this->RewriteTable()->getRewriteArticleslastId();
            } while ($lastId !== null);

            $this->SeoIndex()->setCachedTime($currentTime->format('Y-m-d H:i:s')$elementId$shopId);

            $context = $this->get(ContextServiceInterface::class)->createShopContext($shopId);

            $this->RewriteTable()->sCreateRewriteTableCategories();
            $this->RewriteTable()->sCreateRewriteTableCampaigns();
            $this->RewriteTable()->sCreateRewriteTableContent();
            $this->RewriteTable()->sCreateRewriteTableBlog(null, null, $context);
            $this->RewriteTable()->createManufacturerUrls($context);
            $this->RewriteTable()->sCreateRewriteTableStatic();
            $this->RewriteTable()->createContentTypeUrls($context);

            Shopware()->Events()->notify(
                'Shopware_CronJob_RefreshSeoIndex_CreateRewriteTable',
                [
                    'shopContext' => $context,
                    'cachedTime' => $currentTime,
                ]
Home | Imprint | This part of the site doesn't use cookies.