From 1d7aaeb1ddf0dfff2ec86fff673331858f90e6bb Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Fri, 14 Sep 2018 14:39:47 +0200 Subject: [PATCH] Adde name source to user --- .../src/Entity/Attribut/NameAttribut.php | 13 ++++------ .../Entity/Attribut/NameAttributInterface.php | 10 +++---- .../Entity/Attribut/NameSourceAttribut.php | 26 +++++++++++++++++++ .../Attribut/NameSourceAttributInterface.php | 15 +++++++++++ application/src/Entity/NameSource.php | 12 ++++++--- .../src/Entity/NameSourceInterface.php | 6 ++--- application/src/Entity/UserSource.php | 19 ++++++++++++-- .../src/Entity/UserSourceInterface.php | 3 ++- application/src/Form/NameSourceType.php | 4 +-- application/src/Form/UserSourceType.php | 4 +-- 10 files changed, 82 insertions(+), 30 deletions(-) create mode 100644 application/src/Entity/Attribut/NameSourceAttribut.php create mode 100644 application/src/Entity/Attribut/NameSourceAttributInterface.php diff --git a/application/src/Entity/Attribut/NameAttribut.php b/application/src/Entity/Attribut/NameAttribut.php index b27a0c9..0d7fa74 100644 --- a/application/src/Entity/Attribut/NameAttribut.php +++ b/application/src/Entity/Attribut/NameAttribut.php @@ -1,27 +1,24 @@ 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 index 7904b53..083527c 100644 --- a/application/src/Entity/Attribut/NameAttributInterface.php +++ b/application/src/Entity/Attribut/NameAttributInterface.php @@ -1,15 +1,13 @@ nameSource = $nameSource; + } + + public function getNameSource(): NameSourceInterface + { + return $this->getNameSource(); + } +} diff --git a/application/src/Entity/Attribut/NameSourceAttributInterface.php b/application/src/Entity/Attribut/NameSourceAttributInterface.php new file mode 100644 index 0000000..22ddae5 --- /dev/null +++ b/application/src/Entity/Attribut/NameSourceAttributInterface.php @@ -0,0 +1,15 @@ +name = ''; + } +} diff --git a/application/src/Entity/NameSourceInterface.php b/application/src/Entity/NameSourceInterface.php index 848ee6c..f85d6ab 100644 --- a/application/src/Entity/NameSourceInterface.php +++ b/application/src/Entity/NameSourceInterface.php @@ -1,14 +1,12 @@ nameSource = new NameSource(); + parent::__construct(); + } } diff --git a/application/src/Entity/UserSourceInterface.php b/application/src/Entity/UserSourceInterface.php index c379129..2a3b87a 100644 --- a/application/src/Entity/UserSourceInterface.php +++ b/application/src/Entity/UserSourceInterface.php @@ -3,10 +3,11 @@ namespace App\Entity; use App\Entity\Attribut\UserAttributInterface; +use App\Entity\Attribut\NameSourceAttributInterface; /** * @author kevinfrantz */ -interface UserSourceInterface extends SourceInterface, UserAttributInterface +interface UserSourceInterface extends SourceInterface, UserAttributInterface, NameSourceAttributInterface { } diff --git a/application/src/Form/NameSourceType.php b/application/src/Form/NameSourceType.php index 8be0342..63020a7 100644 --- a/application/src/Form/NameSourceType.php +++ b/application/src/Form/NameSourceType.php @@ -1,12 +1,10 @@