Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/yandex.market/lib/trading/facade/ |
Upload File : |
<?php namespace Yandex\Market\Trading\Facade; use Bitrix\Main; use Yandex\Market; use Yandex\Market\Trading; class Business { public static function synchronize() { self::applyBusinessSchemeMigration(); self::synchronizeBusinesses(); self::rebuildMenu(); } private static function applyBusinessSchemeMigration() { $migration = new Market\Migration\V300\BusinessScheme(); if ($migration->wasApplied()) { return; } $migration->apply(); } private static function synchronizeBusinesses() { foreach (Trading\Business\Model::loadList() as $business) { try { $business->getCampaignRepository()->synchronize(true); } catch (Main\SystemException $exception) { $business->createLogger()->error($exception); } } } private static function rebuildMenu() { $compiler = new Market\Ui\Trading\MenuCompiler(); $compiler->rebuild(); $compiler->save(); } }