1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
SetFeaturesHandler.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Socialnetwork\Collab\Converter\Handler;
6
7use Bitrix\Main\Result;
8use Bitrix\Socialnetwork\Collab\Converter\Command\AbstractConverterCommand;
9use Bitrix\Socialnetwork\Control\Command\ValueObject\Features;
10use CSocNetFeatures;
11
13{
14 public function __construct(private readonly Features $features)
15 {
16 }
17
18 public function execute(AbstractConverterCommand $command): Result
19 {
20 $featureValues = $this->features->getValue();
21
22 foreach ($featureValues as $featureName => $isActive)
23 {
24 CSocNetFeatures::setFeature(
26 $command->getGroup()->getId(),
27 $featureName,
28 $isActive,
29 false,
30 ['isCollab' => true]
31 );
32 }
33
34 return new Result();
35 }
36}
__construct(private readonly Features $features)
Определения SetFeaturesHandler.php:14
execute(AbstractConverterCommand $command)
Определения SetFeaturesHandler.php:18
const SONET_ENTITY_GROUP
Определения include.php:117