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.

SortableTrait.php 563B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Lc\SovBundle\Doctrine\Extension;
  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. }