Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
Parameterizable.php
1
<?php
2
3
namespace
Bitrix\MessageService\Restriction
;
4
5
use
Bitrix\MessageService\Internal\Entity\RestrictionTable
;
6
7
trait
Parameterizable
8
{
9
abstract
protected
function
getCurrentAdditionalParam(): string;
10
protected
function
insertCounter
(): void
11
{
12
RestrictionTable::insertCounterWithParam($this->getEntityId(), $this->getCurrentAdditionalParam());
13
}
14
15
protected
function
updateCounter
(): bool
16
{
17
if
(in_array($this->getCurrentAdditionalParam(), $this->additionalParams))
18
{
19
return
true
;
20
}
21
22
return
RestrictionTable::updateCounterWithParam($this->getEntityId(), $this->limit, $this->getCurrentAdditionalParam());
23
}
24
}
Bitrix\MessageService\Internal\Entity\RestrictionTable
Definition
restrictiontable.php:31
Bitrix\MessageService\Restriction
Definition
Base.php:3
Bitrix\MessageService\Restriction\insertCounter
insertCounter()
Definition
Parameterizable.php:10
Bitrix\MessageService\Restriction\Parameterizable
trait Parameterizable
Definition
Parameterizable.php:8
Bitrix\MessageService\Restriction\updateCounter
updateCounter()
Definition
Parameterizable.php:15
modules
messageservice
lib
Restriction
Parameterizable.php
Создано системой
1.10.0