From 32da2a70ef278bd42f66eb82c3fbf1905a417b87 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 23 Feb 2015 22:55:06 +0100 Subject: 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 :)) --- src/Wallabag/CoreBundle/Entity/User.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/Wallabag/CoreBundle/Entity/User.php') 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 */ private $entries; + /** + * @ORM\OneToOne(targetEntity="Config", mappedBy="user") + */ + private $config; + public function __construct() { $this->salt = md5(uniqid(null, true)); @@ -320,4 +325,26 @@ class User implements AdvancedUserInterface, \Serializable { return $this->isActive; } + /** + * Set config + * + * @param \Wallabag\CoreBundle\Entity\Config $config + * @return User + */ + public function setConfig(\Wallabag\CoreBundle\Entity\Config $config = null) + { + $this->config = $config; + + return $this; + } + + /** + * Get config + * + * @return \Wallabag\CoreBundle\Entity\Config + */ + public function getConfig() + { + return $this->config; + } } -- cgit v1.2.3