Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

40 lines
934B

  1. <?php
  2. namespace Lc\CaracoleBundle\Model\Order;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\CaracoleBundle\Doctrine\Extension\ReductionTrait;
  5. /**
  6. * @ORM\MappedSuperclass()
  7. */
  8. abstract class OrderProductReductionCatalogModel
  9. {
  10. use ReductionTrait;
  11. /**
  12. * @ORM\Column(type="string", length=255)
  13. */
  14. protected $title;
  15. public function getTitle(): ?string
  16. {
  17. return $this->title;
  18. }
  19. public function setTitle(string $title): self
  20. {
  21. $this->title = $title;
  22. return $this;
  23. }
  24. public function compare($orderProductReductionCatalog)
  25. {
  26. return $orderProductReductionCatalog
  27. && $this->getUnit() == $orderProductReductionCatalog->getUnit()
  28. && (string)$this->getValue() == (string)$orderProductReductionCatalog->getValue()
  29. && $this->getBehaviorTaxRate() == $orderProductReductionCatalog->getBehaviorTaxRate();
  30. }
  31. }