|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Lc\ShopBundle\Model\OrderShop;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
-
-
- abstract class DocumentDeliveryNote extends AbstractDocumentOrder
- {
-
-
- protected $orderShops;
-
- public function __construct()
- {
- $this->orderShops = new ArrayCollection();
- }
-
-
-
- public function getOrderShops(): Collection
- {
- return $this->orderShops;
- }
-
- public function addOrderShop(OrderShop $orderShop): self
- {
- if (!$this->orderShops->contains($orderShop)) {
- $this->orderShops[] = $orderShop;
- $orderShop->setDocumentDeliveryNote($this);
- }
-
- return $this;
- }
-
- public function removeOrderShop(OrderShop $orderShop): self
- {
- if ($this->orderShops->contains($orderShop)) {
- $this->orderShops->removeElement($orderShop);
-
- if ($orderShop->getDocumentDeliveryNote() === $this) {
- $orderShop->setDocumentDeliveryNote(null);
- }
- }
-
- return $this;
- }
- }
|