From bfd5d9416eab0da03a82235baf58df62d5a2ed28 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Fri, 14 Sep 2018 14:12:43 +0200 Subject: [PATCH] Added name source draft --- application/src/Entity/AbstractSource.php | 2 +- .../src/Entity/Attribut/NameAttribut.php | 27 +++++++++++++++++++ .../Entity/Attribut/NameAttributInterface.php | 15 +++++++++++ application/src/Entity/NameSource.php | 23 ++++++++++++++++ .../src/Entity/NameSourceInterface.php | 14 ++++++++++ application/src/Form/NameSourceType.php | 12 +++++++++ application/src/Form/UserSourceType.php | 14 ++++++++++ 7 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 application/src/Entity/Attribut/NameAttribut.php create mode 100644 application/src/Entity/Attribut/NameAttributInterface.php create mode 100644 application/src/Entity/NameSource.php create mode 100644 application/src/Entity/NameSourceInterface.php create mode 100644 application/src/Form/NameSourceType.php create mode 100644 application/src/Form/UserSourceType.php diff --git a/application/src/Entity/AbstractSource.php b/application/src/Entity/AbstractSource.php index 8993455..6d310c2 100644 --- a/application/src/Entity/AbstractSource.php +++ b/application/src/Entity/AbstractSource.php @@ -12,7 +12,7 @@ use Doctrine\ORM\Mapping as ORM; * @ORM\Entity * @ORM\InheritanceType("JOINED") * @ORM\DiscriminatorColumn(name="discr", type="string") - * @ORM\DiscriminatorMap({"user" = "UserSource"}) + * @ORM\DiscriminatorMap({"user" = "UserSource","name" = "NameSource"}) */ abstract class AbstractSource extends AbstractEntity implements SourceInterface { diff --git a/application/src/Entity/Attribut/NameAttribut.php b/application/src/Entity/Attribut/NameAttribut.php new file mode 100644 index 0000000..b27a0c9 --- /dev/null +++ b/application/src/Entity/Attribut/NameAttribut.php @@ -0,0 +1,27 @@ +name = $name; + } + + public function getName(): string + { + return $this->name; + } +} + diff --git a/application/src/Entity/Attribut/NameAttributInterface.php b/application/src/Entity/Attribut/NameAttributInterface.php new file mode 100644 index 0000000..7904b53 --- /dev/null +++ b/application/src/Entity/Attribut/NameAttributInterface.php @@ -0,0 +1,15 @@ +