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.

33 lines
650B

  1. <?php
  2. namespace Lc\ShopBundle\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="string")
  10. */
  11. protected $position = 0;
  12. /**
  13. * @return string
  14. */
  15. public function getPosition(): string
  16. {
  17. return $this->position;
  18. }
  19. /**
  20. * @param string $position
  21. * @return $this
  22. */
  23. public function setPosition(string $position): self
  24. {
  25. $this->position = $position;
  26. return $this;
  27. }
  28. }