diff options
-rw-r--r-- | lib/Db/Item.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/Db/Item.php b/lib/Db/Item.php index 7bb9147b5..81bbe85a8 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -69,6 +69,8 @@ class Item extends Entity implements IAPI, \JsonSerializable protected $categoriesJson; /** @var string */ protected $sharedBy; + /** @var string|null */ + protected $sharedByDisplayName; public function __construct() { @@ -321,6 +323,11 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this->sharedBy; } + public function getSharedByDisplayName(): ?string + { + return $this->sharedByDisplayName; + } + /** * @return null|string */ @@ -364,7 +371,8 @@ class Item extends Entity implements IAPI, \JsonSerializable 'intro' => $this->getIntro(), 'fingerprint' => $this->getFingerprint(), 'categories' => $this->getCategories(), - 'sharedBy' => $this->getSharedBy() + 'sharedBy' => $this->getSharedBy(), + 'sharedByDisplayName' => $this->getSharedByDisplayName() ]; } @@ -556,6 +564,16 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this; } + public function setSharedByDisplayName(string $sharedByDisplayName = null): self + { + if ($this->sharedByDisplayName !== $sharedByDisplayName) { + $this->sharedByDisplayName = $sharedByDisplayName; + $this->markFieldUpdated('sharedByDisplayName'); + } + + return $this; + } + public function setUnread(bool $unread): self { if ($this->unread !== $unread) { |