first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace External\VarioBundle\Resources\script;
use External\VarioBundle\Util\SynchronizerLocator;
use KupShop\AdminBundle\Util\Script\Script;
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
class RunVarioSynchronizationScript extends Script
{
protected static $name = '[Vario] Run synchronization';
protected static $defaultParameters = [
'type' => 'otProductSimple',
'forceSync' => null,
];
protected function run(array $arguments)
{
$locator = ServiceContainer::getService(SynchronizerLocator::class);
$this->log('Running...');
$synchronizer = $locator->getServiceByType($arguments['type']);
if (!empty($arguments['forceSync'])) {
$synchronizer->setForceSync($arguments['forceSync']);
}
$synchronizer->setDebug(true);
$synchronizer->sync();
$this->log('Done');
}
}
return RunVarioSynchronizationScript::class;