aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity/Config.php
diff options
context:
space:
mode:
authorKévin Gomez <contact@kevingomez.fr>2015-10-11 17:14:50 +0200
committerKévin Gomez <contact@kevingomez.fr>2015-11-11 16:23:49 +0100
commitac9fec610a6485b39c856d9cb7d263ce8c5f1223 (patch)
treeef822c68bd263c6a1b99da8bc5edcfe1668c1ea3 /src/Wallabag/CoreBundle/Entity/Config.php
parentc3510620ad0718d2ab1f856e3a838360a5ade314 (diff)
downloadwallabag-ac9fec610a6485b39c856d9cb7d263ce8c5f1223.tar.gz
wallabag-ac9fec610a6485b39c856d9cb7d263ce8c5f1223.tar.zst
wallabag-ac9fec610a6485b39c856d9cb7d263ce8c5f1223.zip
Add TaggingRule entity
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Config.php')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Config.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php
index b2a1915a..496fadb4 100644
--- a/src/Wallabag/CoreBundle/Entity/Config.php
+++ b/src/Wallabag/CoreBundle/Entity/Config.php
@@ -76,12 +76,18 @@ class Config
76 */ 76 */
77 private $user; 77 private $user;
78 78
79 /**
80 * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\TaggingRule", mappedBy="config", cascade={"remove"})
81 */
82 private $taggingRules;
83
79 /* 84 /*
80 * @param User $user 85 * @param User $user
81 */ 86 */
82 public function __construct(\Wallabag\UserBundle\Entity\User $user) 87 public function __construct(\Wallabag\UserBundle\Entity\User $user)
83 { 88 {
84 $this->user = $user; 89 $this->user = $user;
90 $this->taggingRules = new ArrayCollection();
85 } 91 }
86 92
87 /** 93 /**
@@ -237,4 +243,24 @@ class Config
237 { 243 {
238 return $this->rssLimit; 244 return $this->rssLimit;
239 } 245 }
246
247 /**
248 * @param TaggingRule $rule
249 *
250 * @return Config
251 */
252 public function addTaggingRule(TaggingRule $rule)
253 {
254 $this->taggingRules[] = $rule;
255
256 return $this;
257 }
258
259 /**
260 * @return ArrayCollection<TaggingRule>
261 */
262 public function getTaggingRules()
263 {
264 return $this->taggingRules;
265 }
240} 266}