src/Entity/SaleOrderAddress.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Interfaces\AddressInterface;
  4. use App\Repository\SaleOrderAddressRepository;
  5. use App\Traits\AddressTrait;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use JMS\Serializer\Annotation as Serializer;
  8. /**
  9. * @ORM\Entity(repositoryClass=SaleOrderAddressRepository::class)
  10. *
  11. * @Serializer\ExclusionPolicy("ALL")
  12. */
  13. class SaleOrderAddress implements AddressInterface
  14. {
  15. use AddressTrait;
  16. public const BILLING_ADDRESS = 'billing_address';
  17. public const SHIPPING_ADDRESS = 'shipping_address';
  18. /**
  19. * @ORM\Column(type="string", length=255, nullable=true)
  20. */
  21. private ?string $tva = NULL;
  22. public function __clone()
  23. {
  24. if ($this->id) {
  25. $this->setId(NULL);
  26. }
  27. }
  28. public function toArray()
  29. {
  30. $object = get_object_vars($this);
  31. return($object);
  32. }
  33. public function getTva(): ?string
  34. {
  35. return $this->tva;
  36. }
  37. public function setTva(?string $tva): self
  38. {
  39. $this->tva = $tva;
  40. return $this;
  41. }
  42. }