Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Member.php
1<?php
2
4
5use Bitrix\Socialnetwork\EO_UserToGroup;
7
8class Member extends EO_UserToGroup
9{
10 public function isInvited(): bool
11 {
12 return $this->getRole() === UserToGroupTable::ROLE_REQUEST
13 && $this->getInitiatedByType() === UserToGroupTable::INITIATED_BY_GROUP;
14 }
15
16 public function isAwaiting(): bool
17 {
18 return $this->getRole() === UserToGroupTable::ROLE_REQUEST
19 && $this->getInitiatedByType() === UserToGroupTable::INITIATED_BY_USER;
20 }
21
22 public function isMember(): bool
23 {
24 return in_array(
25 $this->getRole(),
27 true
28 );
29 }
30}