]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Config.php
Add TaggingRule entity
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Config.php
index b2a1915a4fdbd22f921e5ecae5212da9ff922d46..496fadb45a98069999b24936d16ce92b04bb400e 100644 (file)
@@ -76,12 +76,18 @@ class Config
      */
     private $user;
 
+    /**
+     * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\TaggingRule", mappedBy="config", cascade={"remove"})
+     */
+    private $taggingRules;
+
     /*
      * @param User     $user
      */
     public function __construct(\Wallabag\UserBundle\Entity\User $user)
     {
         $this->user = $user;
+        $this->taggingRules = new ArrayCollection();
     }
 
     /**
@@ -237,4 +243,24 @@ class Config
     {
         return $this->rssLimit;
     }
+
+    /**
+     * @param TaggingRule $rule
+     *
+     * @return Config
+     */
+    public function addTaggingRule(TaggingRule $rule)
+    {
+        $this->taggingRules[] = $rule;
+
+        return $this;
+    }
+
+    /**
+     * @return ArrayCollection<TaggingRule>
+     */
+    public function getTaggingRules()
+    {
+        return $this->taggingRules;
+    }
 }