Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
CheckChatAddParams.php
1
<?php
2
3
namespace
Bitrix\Im\V2\Controller\Filter
;
4
5
use
Bitrix\Im\V2\Chat
;
6
use
Bitrix\Main\Engine\ActionFilter\Base
;
7
use
Bitrix\Main\Error
;
8
use
Bitrix\Main\Event
;
9
use
Bitrix\Main\EventResult
;
10
11
class
CheckChatAddParams
extends
Base
12
{
13
public
function
onBeforeAction
(
Event
$event)
14
{
15
$arguments = $this->
getAction
()->getArguments();
16
if
(!isset($arguments[
'fields'
]))
17
{
18
$this->
addError
(
new
Error
(
19
'Parameter fields is required'
,
20
Chat
\
ChatError::WRONG_PARAMETER
21
));
22
return
new
EventResult
(EventResult::ERROR,
null
,
null
, $this);
23
}
24
25
return
null
;
26
}
27
}
Bitrix\Im\Chat
Definition
chat.php:19
Bitrix\Im\V2\Chat\ChatError\WRONG_PARAMETER
const WRONG_PARAMETER
Definition
ChatError.php:12
Bitrix\Im\V2\Controller\Filter\CheckChatAddParams
Definition
CheckChatAddParams.php:12
Bitrix\Im\V2\Controller\Filter\CheckChatAddParams\onBeforeAction
onBeforeAction(Event $event)
Definition
CheckChatAddParams.php:13
Bitrix\Im\V2\Error
Definition
Error.php:8
Bitrix\Im\V2\Sync\Event
Definition
Event.php:9
Bitrix\Main\Engine\ActionFilter\Base
Definition
base.php:15
Bitrix\Main\Engine\ActionFilter\Base\addError
addError(Error $error)
Definition
base.php:80
Bitrix\Main\Engine\ActionFilter\Base\getAction
getAction()
Definition
base.php:48
Bitrix\Main\Error
Definition
error.php:14
Bitrix\Main\Event
Definition
event.php:5
Bitrix\Main\EventResult
Definition
eventresult.php:5
Bitrix\Im\V2\Chat
Definition
ChannelChat.php:3
Bitrix\Im\V2\Controller\Filter
Definition
ActionUuidHandler.php:3
modules
im
lib
V2
Controller
Filter
CheckChatAddParams.php
Создано системой
1.10.0