mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
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 :))
This commit is contained in:
parent
fca3c75723
commit
32da2a70ef
247 changed files with 938 additions and 143 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue