diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-03-02 21:23:19 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-03-02 21:23:19 +0100 |
commit | ba7b9d48d407f87690a3fdc199b37714d2a52897 (patch) | |
tree | a15611f10d09749e82011e0d51532af3de8cfabd /src/Wallabag/CoreBundle/Entity | |
parent | fca3c757233940cbe4c431e3e05fe74893225fe0 (diff) | |
parent | 3e30422cdae3cc45f44c3039c2d38b99121dd9e9 (diff) | |
download | wallabag-ba7b9d48d407f87690a3fdc199b37714d2a52897.tar.gz wallabag-ba7b9d48d407f87690a3fdc199b37714d2a52897.tar.zst wallabag-ba7b9d48d407f87690a3fdc199b37714d2a52897.zip |
Merge pull request #1132 from wallabag/v2-theme
V2 theme
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Config.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/User.php | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index 7b4464a1..91f9bfe8 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php | |||
@@ -48,7 +48,7 @@ class Config | |||
48 | private $language; | 48 | private $language; |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * @ORM\ManyToOne(targetEntity="User", inversedBy="config") | 51 | * @ORM\OneToOne(targetEntity="User", inversedBy="config") |
52 | */ | 52 | */ |
53 | private $user; | 53 | private $user; |
54 | 54 | ||
diff --git a/src/Wallabag/CoreBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php index 193dfebc..ed5cfe53 100644 --- a/src/Wallabag/CoreBundle/Entity/User.php +++ b/src/Wallabag/CoreBundle/Entity/User.php | |||
@@ -92,6 +92,11 @@ class User implements AdvancedUserInterface, \Serializable | |||
92 | */ | 92 | */ |
93 | private $entries; | 93 | private $entries; |
94 | 94 | ||
95 | /** | ||
96 | * @ORM\OneToOne(targetEntity="Config", mappedBy="user") | ||
97 | */ | ||
98 | private $config; | ||
99 | |||
95 | public function __construct() | 100 | public function __construct() |
96 | { | 101 | { |
97 | $this->salt = md5(uniqid(null, true)); | 102 | $this->salt = md5(uniqid(null, true)); |
@@ -320,4 +325,26 @@ class User implements AdvancedUserInterface, \Serializable | |||
320 | { | 325 | { |
321 | return $this->isActive; | 326 | return $this->isActive; |
322 | } | 327 | } |
328 | /** | ||
329 | * Set config | ||
330 | * | ||
331 | * @param \Wallabag\CoreBundle\Entity\Config $config | ||
332 | * @return User | ||
333 | */ | ||
334 | public function setConfig(\Wallabag\CoreBundle\Entity\Config $config = null) | ||
335 | { | ||
336 | $this->config = $config; | ||
337 | |||
338 | return $this; | ||
339 | } | ||
340 | |||
341 | /** | ||
342 | * Get config | ||
343 | * | ||
344 | * @return \Wallabag\CoreBundle\Entity\Config | ||
345 | */ | ||
346 | public function getConfig() | ||
347 | { | ||
348 | return $this->config; | ||
349 | } | ||
323 | } | 350 | } |