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.

SluggableTrait.php 477B

3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
123456789101112131415161718192021222324252627
  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=false)
  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. }