From e93cd6c352a8e4fbb4e1174bdb15484adbe4c0f7 Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 26 Sep 2025 12:04:02 +0200 Subject: suppression table Presentation --- src/model/entities/Presentation.php | 47 ------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/model/entities/Presentation.php (limited to 'src/model/entities/Presentation.php') diff --git a/src/model/entities/Presentation.php b/src/model/entities/Presentation.php deleted file mode 100644 index 6ada565..0000000 --- a/src/model/entities/Presentation.php +++ /dev/null @@ -1,47 +0,0 @@ - 'Pleine largeur', 'grid' => 'Grille', 'mosaic' => 'Mosaïque', 'carousel' => 'Carrousel']; - - #[ORM\Id] - #[ORM\GeneratedValue] - #[ORM\Column(type: "integer")] - private int $id_presentation; - - #[ORM\Column(type: "string", length: 255)] - private string $name; - - public function __construct(string $name) - { - $this->name = array_keys(self::$option_list)[0]; // = fullwidth, sécurité option inconnue - foreach(self::$option_list as $key => $value){ - if($name === $key){ - $this->name = $name; - } - } - } - - public function getName(): string - { - return $this->name; - } - - static public function findPresentation(EntityManager $entityManager, string $name): ?self - { - return $entityManager - ->createQuery('SELECT p FROM App\Entity\Presentation p WHERE p.name = :name') - ->setParameter('name', $name) - ->getOneOrNullResult(); - } -} \ No newline at end of file -- cgit v1.2.3