mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	Added name source draft
This commit is contained in:
		| @@ -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 | ||||
| { | ||||
|   | ||||
							
								
								
									
										27
									
								
								application/src/Entity/Attribut/NameAttribut.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								application/src/Entity/Attribut/NameAttribut.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| <?php | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  *         | ||||
|  */ | ||||
| trait NameAttribut { | ||||
|      | ||||
|     /** | ||||
|      *  | ||||
|      * @var string | ||||
|      */ | ||||
|     protected $name; | ||||
|      | ||||
|     public function setName(string $name): void | ||||
|     { | ||||
|         $this->name = $name; | ||||
|     } | ||||
|      | ||||
|     public function getName(): string | ||||
|     { | ||||
|         return $this->name; | ||||
|     } | ||||
| } | ||||
|  | ||||
							
								
								
									
										15
									
								
								application/src/Entity/Attribut/NameAttributInterface.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								application/src/Entity/Attribut/NameAttributInterface.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| <?php | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  *         | ||||
|  */ | ||||
| interface NameAttributInterface | ||||
| { | ||||
|     public function setName(string $name):void; | ||||
|      | ||||
|     public function getName():string; | ||||
| } | ||||
|  | ||||
							
								
								
									
										23
									
								
								application/src/Entity/NameSource.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								application/src/Entity/NameSource.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| <?php | ||||
| namespace App\Entity; | ||||
|  | ||||
| use App\Entity\Attribut\NameAttribut; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  * @ORM\Table(name="source_name") | ||||
|  * @ORM\Entity(repositoryClass="App\Repository\NameSourceRepository") | ||||
|  */ | ||||
| class NameSource extends AbstractSource implements NameSourceInterface | ||||
| { | ||||
|     use NameAttribut; | ||||
|      | ||||
|     /** | ||||
|      * @ORM\Column(type="string",length=255) | ||||
|      * @var string | ||||
|      */ | ||||
|     protected $name; | ||||
| } | ||||
|  | ||||
							
								
								
									
										14
									
								
								application/src/Entity/NameSourceInterface.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								application/src/Entity/NameSourceInterface.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| <?php | ||||
| namespace App\Entity; | ||||
|  | ||||
| use App\Entity\Attribut\NameAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  *         | ||||
|  */ | ||||
| interface NameSourceInterface extends NameAttributInterface | ||||
| { | ||||
| } | ||||
|  | ||||
							
								
								
									
										12
									
								
								application/src/Form/NameSourceType.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								application/src/Form/NameSourceType.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| <?php | ||||
| namespace App\Form; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  *         | ||||
|  */ | ||||
| class NameSourceType | ||||
| { | ||||
| } | ||||
|  | ||||
							
								
								
									
										14
									
								
								application/src/Form/UserSourceType.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								application/src/Form/UserSourceType.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| <?php | ||||
| namespace App\Form; | ||||
|  | ||||
| use Symfony\Component\Form\AbstractType; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  *         | ||||
|  */ | ||||
| class UserSourceType extends AbstractType | ||||
| { | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user