<?php
namespace My\FrontendBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* My\FrontendBundle\Entity\Word
*
* @ORM\Table()
* @ORM\Entity
*/
class Word
{
...
/**
* @Gedmo\Slug(fields={"title"})
* @ORM\Column(length=128, unique=true)
*/
private $slug;
...
}
Listing 22.1. Dodanie właściwości slug w klasie Word
Rozdział 22. Zachowanie sluggable