1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
UnmarkAsProcessingJobHandler.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Socialnetwork\Collab\Onboarding\Command\Handler;
6
7use Bitrix\Main\DI\ServiceLocator;
8use Bitrix\Main\Error;
9use Bitrix\Main\Result;
10use Bitrix\Socialnetwork\Collab\Onboarding\Command\Type\UnmarkAsProcessingJobsCommand;
11use Bitrix\Socialnetwork\Collab\Onboarding\Internals\Repository\JobRepositoryInterface;
12use Throwable;
13
15{
16 private JobRepositoryInterface $repository;
17
18 public function __construct()
19 {
20 $this->repository = ServiceLocator::getInstance()->get('socialnetwork.onboarding.job.repository');
21 }
22
24 {
25 $result = new Result();
26
27 if (empty($command->jobIds))
28 {
29 return $result;
30 }
31
32 try
33 {
34 $this->repository->unmarkAsProcessing(...$command->jobIds);
35 }
36 catch (Throwable $t)
37 {
38 $result->addError(Error::createFromThrowable($t));
39 }
40
41 return $result;
42 }
43}
$result
Определения get_property_values.php:14