3namespace Bitrix\Socialnetwork\Controller\Livefeed\Spaces;
5use Bitrix\Main\Engine\AutoWire\BinderArgumentException;
6use Bitrix\Main\Engine\AutoWire\ExactParameter;
7use Bitrix\Main\Engine\Controller;
8use Bitrix\Main\Engine\CurrentUser;
9use Bitrix\Socialnetwork\Integration\Pull\PushService;
10use Bitrix\Socialnetwork\Internals\EventService\Push\PushEventDictionary;
11use Bitrix\Socialnetwork\Space\List\Item\Space;
12use Bitrix\Socialnetwork\Space\Toolbar\Switcher\Factory\SwitcherFactory;
13use Bitrix\Socialnetwork\Space\Toolbar\Switcher\SwitcherInterface;
26 SwitcherInterface::class,
29 SwitcherFactory::get($switcher[
'type'], $this->userId, $switcher[
'spaceId'])
34 fn (
string $className,
int $space):
Space => (
new Space())->setId($space)
58 'mode' =>
$result->getData()[
'value'],
59 'message' =>
$result->getData()[
'message'],
78 'mode' =>
$result->getData()[
'value'],
79 'message' =>
$result->getData()[
'message'],
96 'mode' =>
$result->getData()[
'value'],
100 protected function init(): void
103 $this->userId = CurrentUser::get()->getId();
106 private function sendPush(
string $command,
int $spaceId,
string $action =
''): void
109 'GROUP_ID' => $spaceId,
114 $parameters[
'ACTION'] =
$action;
117 PushService::addEvent(
120 'module_id' =>
'socialnetwork',
121 'command' => $command,
122 'params' => $parameters,
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
followAction(SwitcherInterface $switcher, Space $space)
pinAction(SwitcherInterface $switcher, Space $space)
trackAction(SwitcherInterface $switcher, Space $space)
const EVENT_WORKGROUP_SUBSCRIBE_CHANGED
const EVENT_WORKGROUP_PIN_CHANGED
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)