|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\ORM\Mapping as ORM;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Lc\ShopBundle\Context\FilterMerchantInterface;
-
-
-
- abstract class GroupUser extends AbstractDocumentEntity implements FilterMerchantInterface
- {
-
-
-
- protected $merchant;
-
-
-
- protected $users;
-
-
- public function __toString()
- {
- return $this->getTitle();
- }
-
-
- public function __construct()
- {
- $this->users = new ArrayCollection();
- }
-
- public function getMerchant(): ?Merchant
- {
- return $this->merchant;
- }
-
- public function setMerchant(?Merchant $merchant): self
- {
- $this->merchant = $merchant;
-
- return $this;
- }
-
-
-
- public function getUsers(): Collection
- {
- return $this->users;
- }
-
- public function addUser(User $user): self
- {
- if (!$this->users->contains($user)) {
- $this->users[] = $user;
- }
-
- return $this;
- }
-
- public function removeUser(User $user): self
- {
- if ($this->users->contains($user)) {
- $this->users->removeElement($user);
- }
-
- return $this;
- }
-
-
- }
|