1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ChangeBlock.php
См. документацию.
1<?php
2declare(strict_types=1);
3
4namespace Bitrix\Landing\Copilot\Generation\Scenario;
5
6use Bitrix\Landing\Copilot\Connector;
7use Bitrix\Landing\Copilot\Connector\Chat\ICopilotChatBot;
8use Bitrix\Landing\Copilot\Generation;
9use Bitrix\Landing\Copilot\Generation\Step;
10
12{
13 protected const EVENT_FINISH = 'onChangeBlockFinish';
14
18 public function getMap(): array
19 {
20 return [
21 10 => new Step\RequestBlockContent(),
23 20 => new Step\TaskUpdateBlock(),
24 30 => new Step\RequestImages(),
26 1000 => new Step\Finish(),
27 ];
28 }
29
33 public function getChatbot(): ?ICopilotChatBot
34 {
36 }
37
43 public function getQuotaCalculateStep(): int
44 {
45 return 10;
46 }
47
51 public function onFinish(Generation $generation): void
52 {
53 $chatId = $generation->getChatId();
54 if (!isset($chatId) || $chatId <= 0)
55 {
56 return;
57 }
58
59 $this->getChatbot()?->sendGenerationEndMessage(
60 new Connector\Chat\ChatBotMessageDto($chatId, $generation->getId())
61 );
62 $generation->getEvent()->send(
63 self::EVENT_FINISH,
64 [
65 'blockData' => $generation->getBlocksData($generation->getSiteData()->getBlocks()),
66 ],
67 );
68 }
69}
static getChangeBlockChatBot()
Определения Chat.php:39
onFinish(Generation $generation)
Определения ChangeBlock.php:51
getBlocksData(array $blocks)
Определения Generation.php:543
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения binding.php:2
Определения ai.php:3