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.

28 lines
476B

  1. <?php
  2. namespace Lc\SovBundle\Doctrine\Extension;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. trait SluggableTrait
  6. {
  7. /**
  8. * @ORM\Column(type="string", length=255)
  9. * @Gedmo\Slug(fields={"title"}, unique=true)
  10. */
  11. protected $slug;
  12. public function getSlug(): ?string
  13. {
  14. return $this->slug;
  15. }
  16. public function setSlug(?string $slug): self
  17. {
  18. $this->slug = $slug;
  19. return $this;
  20. }
  21. }