$export =
$this->container->
get('modules'
)->
Export();
$export->sSYSTEM =
$this->container->
get('modules'
)->
System();
$this->sSmarty =
$this->container->
get(Enlight_Template_Manager::
class);
// Prevent notices to clutter generated files
$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);