1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Im.php
См. документацию.
1<?php
2
4
5
11
12class Im extends Controller
13{
14 public function sendAction(
15 int $chatId,
16 array $IM_MESSAGE_VOTE_DATA,
17 ?string $templateId = null,
18 ): ?array
19 {
20 $currentUserId = (int)CurrentUser::get()->getId();
21 if ($currentUserId <= 0)
22 {
23 $this->addError(new Error('Access denied'));
24
25 return null;
26 }
27
28 $result = ImVote::sendVote($chatId, $currentUserId, $IM_MESSAGE_VOTE_DATA, $templateId);
29 if ($result instanceof ImVoteSendResult)
30 {
31 return [
32 'messageId' => $result->messageId,
33 'voteId' => $result->voteId,
34 ];
35 }
36
37 $this->addErrors($result->getErrors());
38
39 return null;
40 }
41}
Определения error.php:15
sendAction(int $chatId, array $IM_MESSAGE_VOTE_DATA, ?string $templateId=null,)
Определения Im.php:14
static sendVote(int $chatId, int $ownerUserId, array $voteFields, ?string $templateId=null,)
Определения ImVote.php:43
$templateId
Определения component_props2.php:51
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14