You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 line
690B

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use phpDocumentor\Reflection\Types\Integer;
  6. trait SortableTrait
  7. {
  8. /**
  9. * @var string
  10. * @ORM\Column(type="float")
  11. */
  12. protected $position = 0;
  13. /**
  14. * @return float
  15. */
  16. public function getPosition(): float
  17. {
  18. return $this->position;
  19. }
  20. /**
  21. * @param float $position
  22. * @return $this
  23. */
  24. public function setPosition(float $position): self
  25. {
  26. $this->position = $position;
  27. return $this;
  28. }
  29. }