mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Adde name source to user
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Attribut\UserAttribut;
|
||||
use App\Entity\Attribut\NameSourceAttribut;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -12,13 +13,27 @@ use App\Entity\Attribut\UserAttribut;
|
||||
*/
|
||||
class UserSource extends AbstractSource implements UserSourceInterface
|
||||
{
|
||||
use UserAttribut;
|
||||
use UserAttribut,NameSourceAttribut;
|
||||
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="User")
|
||||
* @ORM\OneToOne(targetEntity="User",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
||||
*
|
||||
* @var User
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="NameSource",cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="name_id", referencedColumnName="id")
|
||||
*
|
||||
* @var NameSourceInterface
|
||||
*/
|
||||
protected $nameSource;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->nameSource = new NameSource();
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user