Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
jointlink.php
1<?php
2
4
7
8abstract class JointLink extends Link
9{
11 private array $members = [];
13 private ?string $membersHash = null;
14
15 public function getMembers(): array
16 {
17 return $this->members;
18 }
19
20 public function setMembers(array $members): self
21 {
22 foreach ($members as $key => $value)
23 {
24 if (!($value instanceof Member) || $value->getId() === $this->getOwnerId())
25 {
26 unset($members[$key]);
27 }
28 }
29 $this->members = $members;
30
31 return $this;
32 }
33
34 public function getMembersHash(): ?string
35 {
36 return $this->membersHash;
37 }
38
39 public function setMembersHash(?string $membersHash): static
40 {
41 $this->membersHash = $membersHash;
42
43 return $this;
44 }
45
46 public function isJoint(): bool
47 {
48 return !empty($this->members);
49 }
50
51 abstract public function getOwnerId(): int;
52}