1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
DeleteOperation.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Socialnetwork\Control\Operation;
6
7use Bitrix\Main\Error;
8use Bitrix\Socialnetwork\Control\Command\DeleteCommand;
9use Bitrix\Socialnetwork\Control\Exception\GroupNotDeletedException;
10use Bitrix\Socialnetwork\Control\GroupResult;
11use Bitrix\Socialnetwork\Item\Workgroup;
12use CSocNetGroup;
13
15{
17
19 {
20 $this->command = $command;
21 }
22
23 public function run(): GroupResult
24 {
25 $result = new GroupResult();
26
27 $deleteResult = CSocNetGroup::Delete($this->command->getId());
28
29 if ($deleteResult === false)
30 {
31 $result->addApplicationError();
32
33 return $result;
34 }
35
36 $result->setGroup(Workgroup::createFromId($this->command->getId()));
37
38 return $result;
39 }
40}
$result
Определения get_property_values.php:14
static createFromId(int $itemId)