3declare(strict_types=1);
5namespace Bitrix\Socialnetwork\Collab\Onboarding\Internals\Repository\Cache;
7use Bitrix\Main\ArgumentException;
8use Bitrix\Main\DI\ServiceLocator;
9use Bitrix\Main\ObjectPropertyException;
10use Bitrix\Main\SystemException;
11use Bitrix\Socialnetwork\Collab\Onboarding\Entity\JobCollection;
12use Bitrix\Socialnetwork\Collab\Onboarding\Integration\Im\Promotion\PromotionService;
13use Bitrix\Socialnetwork\Helper\InstanceTrait;
22 private function __construct()
24 $this->cache = ServiceLocator::getInstance()->get(
'socialnetwork.onboarding.job.cache');
25 $this->promoService = ServiceLocator::getInstance()->get(
'socialnetwork.onboarding.promotion.service');
30 return $this->cache->getByUserId(
$userId);
39 $this->cache->save($sortedByUserJobs);
40 $this->promoService->onPromotionUpdate($sortedByUserJobs);
49 $this->cache->cleanByJobCollection($sortedByUserJobs);
51 $cachedByUserJobs = [];
52 foreach (array_keys($sortedByUserJobs) as
$userId)
57 $this->promoService->onPromotionUpdate($cachedByUserJobs);
62 $this->cache->cleanByUserIds(...$userIds);
64 $cachedByUserJobs = [];
70 $this->promoService->onPromotionUpdate($cachedByUserJobs);
80 $this->cache->cleanByCollabIds(...$collabIds);
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
cleanByUserIds(int ... $userIds)
save(array $sortedByUserJobs)
cleanByCollabIds(int ... $collabIds)
cleanByJobCollection(array $sortedByUserJobs)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)