2018-09-13 14:39:03 +02:00
|
|
|
<?php
|
2018-09-13 16:51:58 +02:00
|
|
|
|
2018-11-21 17:55:48 +01:00
|
|
|
namespace App\Entity\Source\Complex;
|
2018-09-13 14:39:03 +02:00
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
use App\Entity\Attribut\UserAttribut;
|
2018-10-03 16:48:16 +02:00
|
|
|
use App\Entity\UserInterface;
|
2018-11-15 19:55:03 +01:00
|
|
|
use App\Entity\Attribut\PersonIdentitySourceAttribut;
|
2018-09-13 14:39:03 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
2018-11-04 12:00:35 +01:00
|
|
|
* @ORM\Table(name="source_data_user")
|
2018-09-13 14:39:03 +02:00
|
|
|
* @ORM\Entity(repositoryClass="App\Repository\UserSourceRepository")
|
|
|
|
*/
|
2018-11-21 18:08:19 +01:00
|
|
|
class UserSource extends AbstractComplexSource implements UserSourceInterface
|
2018-09-13 14:39:03 +02:00
|
|
|
{
|
2018-11-15 19:55:03 +01:00
|
|
|
use UserAttribut,PersonIdentitySourceAttribut;
|
2018-09-13 16:51:58 +02:00
|
|
|
|
2018-09-13 14:39:03 +02:00
|
|
|
/**
|
2018-10-03 16:48:16 +02:00
|
|
|
* @ORM\OneToOne(targetEntity="App\Entity\User",cascade={"persist", "remove"})
|
2018-11-17 14:48:48 +01:00
|
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id",onDelete="CASCADE")
|
2018-09-13 16:51:58 +02:00
|
|
|
*
|
2018-10-03 16:48:16 +02:00
|
|
|
* @var UserInterface
|
2018-09-13 14:39:03 +02:00
|
|
|
*/
|
|
|
|
protected $user;
|
2018-09-14 14:39:47 +02:00
|
|
|
|
2018-11-15 20:30:34 +01:00
|
|
|
/**
|
2018-11-18 12:16:38 +01:00
|
|
|
* @ORM\OneToOne(targetEntity="PersonIdentitySource",cascade={"persist", "remove"})
|
2018-11-18 12:25:36 +01:00
|
|
|
* @ORM\JoinColumn(name="identity_id", referencedColumnName="id",onDelete="CASCADE")
|
2018-11-15 20:30:34 +01:00
|
|
|
*
|
|
|
|
* @var PersonIdentitySourceInterface
|
|
|
|
*/
|
|
|
|
protected $personIdentitySource;
|
|
|
|
|
2018-09-14 14:39:47 +02:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
}
|
2018-11-22 21:54:57 +01:00
|
|
|
|
|
|
|
public function hasPersonIdentitySource(): bool
|
|
|
|
{
|
|
|
|
return isset($this->personIdentitySource);
|
|
|
|
}
|
2018-09-13 14:39:03 +02:00
|
|
|
}
|