No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

61 líneas
1.2KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Doctrine\Extension;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
  5. /**
  6. * @ORM\MappedSuperclass()
  7. */
  8. trait OrderPayoffTrait
  9. {
  10. use PayoffTrait;
  11. /**
  12. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", inversedBy="orderPayments")
  13. * @ORM\JoinColumn(nullable=false)
  14. */
  15. protected $orderShop;
  16. /**
  17. * @ORM\Column(type="boolean")
  18. */
  19. protected $editable;
  20. public function __toString()
  21. {
  22. return $this->amount . ' le ' . $this->getPaidAt()->format('d-m-y') . ' par ' . $this->getMeanPayment();
  23. }
  24. public function getOrderShop(): ?OrderShopInterface
  25. {
  26. return $this->orderShop;
  27. }
  28. public function setOrderShop(?OrderShopInterface $orderShop): self
  29. {
  30. $this->orderShop = $orderShop;
  31. return $this;
  32. }
  33. public function setEditable(bool $editable): self
  34. {
  35. $this->editable = $editable;
  36. return $this;
  37. }
  38. public function getEditable(): ?bool
  39. {
  40. return $this->editable;
  41. }
  42. public function isEditable(): ?bool
  43. {
  44. return $this->editable;
  45. }
  46. }