aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity/User.php
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-02-23 22:55:06 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-03-01 10:49:16 +0100
commit32da2a70ef278bd42f66eb82c3fbf1905a417b87 (patch)
tree587ef3bae1f4881047eb1ceb0c005e7a8287bb71 /src/Wallabag/CoreBundle/Entity/User.php
parentfca3c757233940cbe4c431e3e05fe74893225fe0 (diff)
downloadwallabag-32da2a70ef278bd42f66eb82c3fbf1905a417b87.tar.gz
wallabag-32da2a70ef278bd42f66eb82c3fbf1905a417b87.tar.zst
wallabag-32da2a70ef278bd42f66eb82c3fbf1905a417b87.zip
Add LiipThemeBundle
Re-defined the config / user relation to be OneToOne bidirectionnal. ConfigType is now a service so I can inject the list of available themes that are also used by LiipThemeBundle Force sqlite for test In case of people use a different driver in parameter.yml (yes I do :))
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/User.php')
-rw-r--r--src/Wallabag/CoreBundle/Entity/User.php27
1 files changed, 27 insertions, 0 deletions
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}