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:
parent
c3510620ad
commit
ac9fec610a
3 changed files with 164 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue