@@ -44,9 +44,15 @@ class Sluggable
44
44
/**
45
45
* @ORM\Column(name="code", type="string", length=16)
46
46
*/
47
- #[ORM \Column(name: 'code ' , type: Types::STRING , length: 64 , nullable: true )]
47
+ #[ORM \Column(name: 'code ' , type: Types::STRING , length: 16 , nullable: true )]
48
48
private ?string $ code = null ;
49
49
50
+ /**
51
+ * @ORM\Column(name="ean", type="string", length=13)
52
+ */
53
+ #[ORM \Column(name: 'ean ' , type: Types::STRING , length: 13 , nullable: true )]
54
+ private ?string $ ean = null ;
55
+
50
56
/**
51
57
* @var string|null
52
58
*
@@ -56,17 +62,17 @@ class Sluggable
56
62
* @Gedmo\SlugHandlerOption(name="separator", value="/")
57
63
* }),
58
64
* @Gedmo\SlugHandler(class="Gedmo\Sluggable\Handler\RelativeSlugHandler", options={
59
- * @Gedmo\SlugHandlerOption(name="relationField", value="user "),
60
- * @Gedmo\SlugHandlerOption(name="relationSlugField", value="slug "),
61
- * @Gedmo\SlugHandlerOption(name="separator", value="/ ")
65
+ * @Gedmo\SlugHandlerOption(name="relationField", value="parent "),
66
+ * @Gedmo\SlugHandlerOption(name="relationSlugField", value="test "),
67
+ * @Gedmo\SlugHandlerOption(name="separator", value="- ")
62
68
* })
63
- * }, separator="- ", updatable=false, fields={"title", "code"})
69
+ * }, separator="_ ", updatable=false, fields={"title", "ean", " code"}, style="camel" )
64
70
*
65
71
* @ORM\Column(name="slug", type="string", length=64, unique=true)
66
72
*/
67
- #[Gedmo \Slug(separator: '- ' , updatable: false , fields: ['title ' , 'code ' ])]
73
+ #[Gedmo \Slug(separator: '_ ' , updatable: false , fields: ['title ' , 'ean ' , ' code ' ], style: ' camel ' )]
68
74
#[Gedmo \SlugHandler(class: TreeSlugHandler::class, options: ['parentRelationField ' => 'parent ' , 'separator ' => '/ ' ])]
69
- #[Gedmo \SlugHandler(class: RelativeSlugHandler::class, options: ['relationField ' => 'user ' , 'relationSlugField ' => 'slug ' , 'separator ' => '/ ' ])]
75
+ #[Gedmo \SlugHandler(class: RelativeSlugHandler::class, options: ['relationField ' => 'parent ' , 'relationSlugField ' => 'test ' , 'separator ' => '- ' ])]
70
76
#[ORM \Column(name: 'slug ' , type: Types::STRING , length: 64 , unique: true )]
71
77
private $ slug ;
72
78
0 commit comments