Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
PhonePerUser.php
1<?php
2
4
5class PhonePerUser extends Base
6{
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}