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 lines
637B

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