3 namespace Wallabag\CoreBundle\Entity
;
5 use Doctrine\Common\Collections\ArrayCollection
;
6 use Doctrine\ORM\Mapping
as ORM
;
7 use Symfony\Component\Validator\Constraints
as Assert
;
8 use Wallabag\UserBundle\Entity\User
;
13 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\ConfigRepository")
14 * @ORM\Table(name="`config`")
22 * @ORM\Column(name="id", type="integer")
24 * @ORM\GeneratedValue(strategy="AUTO")
32 * @ORM\Column(name="theme", type="string", nullable=false)
43 * maxMessage = "This will certainly kill the app"
45 * @ORM\Column(name="items_per_page", type="integer", nullable=false)
47 private $itemsPerPage;
53 * @ORM\Column(name="language", type="string", nullable=false)
60 * @ORM\Column(name="rss_token", type="string", nullable=true)
67 * @ORM\Column(name="rss_limit", type="integer", nullable=true)
71 * maxMessage = "This will certainly kill the app"
77 * @ORM\OneToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="config")
82 * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\TaggingRule", mappedBy="config", cascade={"remove"})
83 * @ORM\OrderBy({"id" = "ASC"})
85 private $taggingRules;
90 public function __construct(User
$user)
93 $this->taggingRules
= new ArrayCollection();
101 public function getId()
109 * @param string $theme
113 public function setTheme($theme)
115 $this->theme
= $theme;
125 public function getTheme()
133 * @param int $itemsPerPage
137 public function setItemsPerPage($itemsPerPage)
139 $this->itemsPerPage
= $itemsPerPage;
149 public function getItemsPerPage()
151 return $this->itemsPerPage
;
157 * @param string $language
161 public function setLanguage($language)
163 $this->language
= $language;
173 public function getLanguage()
175 return $this->language
;
185 public function setUser(User
$user = null)
197 public function getUser()
205 * @param string $rssToken
209 public function setRssToken($rssToken)
211 $this->rssToken
= $rssToken;
221 public function getRssToken()
223 return $this->rssToken
;
229 * @param int $rssLimit
233 public function setRssLimit($rssLimit)
235 $this->rssLimit
= $rssLimit;
245 public function getRssLimit()
247 return $this->rssLimit
;
251 * @param TaggingRule $rule
255 public function addTaggingRule(TaggingRule
$rule)
257 $this->taggingRules
[] = $rule;
263 * @return ArrayCollection<TaggingRule>
265 public function getTaggingRules()
267 return $this->taggingRules
;