1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Add TaggingRule entity

This commit is contained in:
Kévin Gomez 2015-10-11 17:14:50 +02:00
parent c3510620ad
commit ac9fec610a
3 changed files with 164 additions and 16 deletions

View 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;
}
}