generateFeed example

        $this->registerErrorHandler($output);

        $productFeedRepository = $this->container->get(ModelManager::class)->getRepository(ProductFeed::class);
        if (empty($feedId)) {
            $activeFeeds = $productFeedRepository->getActiveListQuery()->getResult();

            /** @var ProductFeed $feedModel */
            foreach ($activeFeeds as $feedModel) {
                if ($feedModel->getInterval() === 0) {
                    continue;
                }
                $this->generateFeed($export$feedModel);
            }
        } else {
            /** @var ProductFeed|null $productFeed */
            $productFeed = $productFeedRepository->find((int) $feedId);
            if ($productFeed === null) {
                throw new RuntimeException(sprintf("Unable to load feed with id %s\n", $feedId));
            }

            if ($productFeed->getActive() !== 1) {
                throw new RuntimeException(sprintf("The feed with id %s is not active\n", $feedId));
            }
            
Home | Imprint | This part of the site doesn't use cookies.