* Config.
*
* @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\ConfigRepository")
- * @ORM\Table(name="`config`")
- * @ORM\Entity
+ * @ORM\Table(
+ * name="`config`",
+ * indexes={
+ * @ORM\Index(name="config_feed_token", columns={"feed_token"}, options={"lengths"={255}}),
+ * }
+ * )
*/
class Config
{
*/
private $taggingRules;
+ /**
+ * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\IgnoreOriginUserRule", mappedBy="config", cascade={"remove"})
+ * @ORM\OrderBy({"id" = "ASC"})
+ */
+ private $ignoreOriginRules;
+
/*
* @param User $user
*/
{
$this->user = $user;
$this->taggingRules = new ArrayCollection();
+ $this->ignoreOriginRules = new ArrayCollection();
}
/**
}
/**
- * @param TaggingRule $rule
- *
* @return Config
*/
public function addTaggingRule(TaggingRule $rule)
{
return $this->taggingRules;
}
+
+ /**
+ * @return Config
+ */
+ public function addIgnoreOriginRule(IgnoreOriginUserRule $rule)
+ {
+ $this->ignoreOriginRules[] = $rule;
+
+ return $this;
+ }
+
+ /**
+ * @return ArrayCollection<IgnoreOriginUserRule>
+ */
+ public function getIgnoreOriginRules()
+ {
+ return $this->ignoreOriginRules;
+ }
}