Skip to content

Commit

Permalink
[BUGFIX] Fix tag property in client model (georgringer#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsenj authored Sep 4, 2024
1 parent 752ba2a commit 2739003
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions Classes/Domain/Model/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Client extends AbstractEntity
protected Sla|LazyLoadingProxy|null $sla = null;

#[Lazy]
protected Tag|LazyLoadingProxy|null $tag = null;
protected ObjectStorage|LazyLoadingProxy $tag;

public function __construct()
{
Expand All @@ -82,6 +82,7 @@ public function __construct()
protected function initStorageObjects(): void
{
$this->extensions = new ObjectStorage();
$this->tag = new ObjectStorage();
}

public function getTitle(): string
Expand Down Expand Up @@ -385,12 +386,23 @@ public function setSla(Sla $sla): void
$this->sla = $sla;
}

public function getTag(): ?Tag
/**
* Returns the tags
*
* @return ObjectStorage<Tag>
*/
public function getTag(): ObjectStorage
{
return $this->tag instanceof LazyLoadingProxy ? $this->tag->_loadRealInstance() : $this->tag;
}

public function setTag(Tag $tag): void
/**
* Sets the tags
*
* @param ObjectStorage<Tag> $tag
* @return void
*/
public function setTag(ObjectStorage $tag): void
{
$this->tag = $tag;
}
Expand Down

0 comments on commit 2739003

Please sign in to comment.