Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
PhonePerUser.php
1
<?php
2
3
namespace
Bitrix\MessageService\Restriction
;
4
5
class
PhonePerUser
extends
Base
6
{
7
use
Parameterizable
;
8
use SkippingUnauthorized;
9
10
public
function
getEntityId
(): string
11
{
12
return
'ppu_'
. $this->
getEntity
();
13
}
14
15
protected
function
getOptionLimitName
(): string
16
{
17
return
'network_restriction_phone_per_user'
;
18
}
19
20
protected
function
getEntity
(): string
21
{
22
global $USER;
23
$userId = is_object($USER) ? $USER->getId() : 0;
24
25
return
(
string
)($this->message->getAuthorId() ?: $userId);
26
}
27
28
protected
function
getCurrentAdditionalParam
(): string
29
{
30
return
$this->message->getTo();
31
}
32
33
protected
function
getDefaultLimit
(): int
34
{
35
return
2;
36
}
37
}
Bitrix\MessageService\Restriction\Base
Definition
Base.php:12
Bitrix\MessageService\Restriction\PhonePerUser
Definition
PhonePerUser.php:6
Bitrix\MessageService\Restriction\PhonePerUser\getEntityId
getEntityId()
Definition
PhonePerUser.php:10
Bitrix\MessageService\Restriction\PhonePerUser\getEntity
getEntity()
Definition
PhonePerUser.php:20
Bitrix\MessageService\Restriction\PhonePerUser\getDefaultLimit
getDefaultLimit()
Definition
PhonePerUser.php:33
Bitrix\MessageService\Restriction\PhonePerUser\getOptionLimitName
getOptionLimitName()
Definition
PhonePerUser.php:15
Bitrix\MessageService\Restriction\PhonePerUser\getCurrentAdditionalParam
getCurrentAdditionalParam()
Definition
PhonePerUser.php:28
Bitrix\MessageService\Restriction
Definition
Base.php:3
Bitrix\MessageService\Restriction\Parameterizable
trait Parameterizable
Definition
Parameterizable.php:8
modules
messageservice
lib
Restriction
PhonePerUser.php
Создано системой
1.10.0