1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
InputAction.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Controller\Chat;
4
5use Bitrix\Im\V2\Chat;
6use Bitrix\Im\V2\Chat\InputAction\Action;
7use Bitrix\Im\V2\Chat\InputAction\Type;
8use Bitrix\Im\V2\Controller\BaseController;
9use Bitrix\Main\Engine\AutoWire\ExactParameter;
10
12{
13 public function getAutoWiredParameters()
14 {
15 return array_merge(parent::getAutoWiredParameters(), [
17 Type::class,
18 'actionType',
19 function($className, string $type) {
20 return Type::tryFrom($type) ?? Type::Writing;
21 }
22 ),
23 ]);
24 }
25
27 {
28 return new ExactParameter(
29 Action::class,
30 'action',
31 function ($className, Chat $chat, Type $actionType) {
32 return new Action($chat, $actionType);
33 }
34 );
35 }
36
42 public function notifyAction(Action $action, Chat $chat): ?array
43 {
44 $result = $action->notify();
45
46 if (!$result->isSuccess())
47 {
48 $this->addErrors($result->getErrors());
49
50 return null;
51 }
52
53 return ['result' => true];
54 }
55}
$type
Определения options.php:106
notifyAction(Action $action, Chat $chat)
Определения InputAction.php:42
</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
Определения collection.php:2
$action
Определения file_dialog.php:21