From f27cca08ff786ceff1870147f6d6bad14d71117f Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 23 Oct 2026 00:47:32 +0200 Subject: =?UTF-8?q?dossiers=20avec=20majuscule,=20namespace=20pour=20toute?= =?UTF-8?q?s=20les=20classes,=20autoload=20psr-4,=20UserDataService::creat?= =?UTF-8?q?eZip=20d=C3=A9plac=C3=A9=20dans=20Backup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/entities/Presentation.php | 135 ------------------------------------ 1 file changed, 135 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 d66bf24..0000000 --- a/src/model/entities/Presentation.php +++ /dev/null @@ -1,135 +0,0 @@ -data = $data; - $this->node = $node; - /*if(!empty($presentation) && $presentation === 'grid'){ - $this->grid_cols_min_width = 250; - } - $this->chrono_order = $chrono_order ?? null;*/ - } - - /*public function getId(): int - { - return $this->id_presentation; - }*/ - - public function setNode(?Node $node): void - { - $this->node = $node; - } - - // un trait pour ça - public function getData(): array - { - return $this->data; - } - public function updateData(string $key, string|int|bool|array $value = ''): void - { - if($value !== ''){ - $this->data[$key] = $value; - } - // si $value est vide, supprime la clé - elseif(isset($this->data[$key])){ - unset($this->data[$key]); - } - } - - // spécifique aux blocs contenant des articles - public function getPresentation(): ?string - { - return $this->presentation; - } - public function setPresentation(string $presentation): void - { - $this->presentation = $presentation; - } - public function getColsMinWidth(): int - { - $default = 320; // pixels - return $this->grid_cols_min_width === null ? $default : $this->grid_cols_min_width; - } - public function setColsMinWidth(int $columns): void - { - $this->grid_cols_min_width = $columns; - } - public function getChronoOrder(): bool - { - return $this->chrono_order ?? false; - } - public function setChronoOrder(bool $reverse_order): void - { - $this->chrono_order = $reverse_order; - } - - public function getPaginationLimit(): ?int - { - $default = 12; // si 0 pas de pagination, 12 rend bien avec des grilles de 2, 3 ou 4 colonnes - return $this->pagination_limit === null ? $default : $this->pagination_limit; - } - public function setPaginationLimit(int $pagination_limit): void - { - $this->pagination_limit = $pagination_limit; - } - public function getNumberOfPages(): int - { - return $this->nb_pages; - } - public function setNumberOfPages(int $nb_pages): void - { - $this->nb_pages = $nb_pages; - } - - - /* -- blocs et présentations disponibles dans l'application -- */ - const BLOCKS = ['post_block' => 'Articles libres', 'news_block' => 'Actualités', - //'galery' => 'Galerie', - 'calendar' => 'Calendrier', 'form' => 'Formulaire' - ]; - const PRESENTATIONS = ['fullwidth' => 'Pleine largeur', 'grid' => 'Grille', 'mosaic' => 'Mosaïque' - //, 'carousel' => 'Carrousel' - ]; - static public function hasPresentation(string $block): bool - { - return in_array($block, ['post_block', 'news_block']) ? true : false; - } -} \ No newline at end of file -- cgit v1.2.3