Explorar o código

Update in doc/sluggable.md

Dinoweb %!s(int64=14) %!d(string=hai) anos
pai
achega
a1599e92ce
Modificáronse 1 ficheiros con 22 adicións e 3 borrados
  1. 22 3
      doc/sluggable.md

+ 22 - 3
doc/sluggable.md

@@ -369,24 +369,38 @@ And the Entity should look like:
     
     
         /**
         /**
          * @gedmo:Translatable
          * @gedmo:Translatable
-         * @gedmo:Sluggable
+         * @gedmo:Sluggable(slugField="slug")
          * @Column(name="title", type="string", length=64)
          * @Column(name="title", type="string", length=64)
          */
          */
         private $title;
         private $title;
     
     
         /**
         /**
          * @gedmo:Translatable
          * @gedmo:Translatable
-         * @gedmo:Sluggable
+         * @gedmo:Sluggable(slugField="slug")
          * @Column(name="code", type="string", length=16)
          * @Column(name="code", type="string", length=16)
          */
          */
         private $code;
         private $code;
-    
+        
         /**
         /**
          * @gedmo:Translatable
          * @gedmo:Translatable
          * @gedmo:Slug
          * @gedmo:Slug
          * @Column(name="slug", type="string", length=128, unique=true)
          * @Column(name="slug", type="string", length=128, unique=true)
          */
          */
         private $slug;
         private $slug;
+        
+        /**
+        * @Gedmo:Sluggable(slugField="uniqueSlug")
+        * @ORM\Column(type="string", length=64)
+        */
+        private $uniqueTitle;
+        
+        /**
+        * @Gedmo:Slug
+        * @ORM\Column(type="string", length=128)
+        */
+        private $uniqueSlug;
+    
+        
     
     
         public function getId()
         public function getId()
         {
         {
@@ -417,6 +431,11 @@ And the Entity should look like:
         {
         {
             return $this->slug;
             return $this->slug;
         }
         }
+        
+        public function getUniqueSlug()
+        {
+            return $this->uniqueSlug;
+        }
     }
     }
 
 
 Now the generated slug will be translated by Translatable behavior
 Now the generated slug will be translated by Translatable behavior