]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Tag.php
Remove ability to change username
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Tag.php
index 5aed1fa010008727e3550a6763f710d291ec212f..9ae5867c6981ceccb04fbff2c24e1ef2d5a1567e 100644 (file)
@@ -41,8 +41,14 @@ class Tag
      */
     private $entries;
 
-    public function __construct()
+    /**
+     * @ORM\ManyToOne(targetEntity="User", inversedBy="tags")
+     */
+    private $user;
+
+    public function __construct(User $user)
     {
+        $this->user    = $user;
         $this->entries = new ArrayCollection();
     }
     /**
@@ -82,4 +88,12 @@ class Tag
     {
         $this->entries[] = $entry;
     }
+
+    /**
+     * @return User
+     */
+    public function getUser()
+    {
+        return $this->user;
+    }
 }