27 Zeilen
480B

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