From 4c02a3ec747904fea97bb2144c035f96cfaffdcb Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Thu, 19 Jan 2023 16:17:45 +0100 Subject: [PATCH] add CategoriesController --- Controllers/CategoriesController.php | 41 +++++++++++++++++++++++ Views/category/category.php | 50 ---------------------------- Views/category/view.php | 21 ++++++++++++ 3 files changed, 62 insertions(+), 50 deletions(-) create mode 100644 Controllers/CategoriesController.php delete mode 100644 Views/category/category.php create mode 100644 Views/category/view.php diff --git a/Controllers/CategoriesController.php b/Controllers/CategoriesController.php new file mode 100644 index 0000000..a0933f9 --- /dev/null +++ b/Controllers/CategoriesController.php @@ -0,0 +1,41 @@ + "1", + "nom" => "Quaso", + "img" => "4.jpg", + "note" => "4.5" + ), + array( + "id" => "1", + "nom" => "Quaso", + "img" => "4.jpg", + "note" => "4.5" + ), + array( + "id" => "1", + "nom" => "Quaso", + "img" => "4.jpg", + "note" => "4.5" + ) + ); + + $A_array_categories = array( + "Type de cuisson" => $A_array_recipes_Type_de_cuisson, + "Temps de préparation" => $A_array_recipes_Type_de_cuisson, + "Difficulté" => $A_array_recipes_Type_de_cuisson, + "Végan" => $A_array_recipes_Type_de_cuisson, + "Sans gluten" => $A_array_recipes_Type_de_cuisson, + "Sans lactose" => $A_array_recipes_Type_de_cuisson + ); + + View::show("category/view", $A_array_categories); + } + +} diff --git a/Views/category/category.php b/Views/category/category.php deleted file mode 100644 index 3cd02b7..0000000 --- a/Views/category/category.php +++ /dev/null @@ -1,50 +0,0 @@ - "1", - "nom" => "Quaso", - "img" => "4.jpg", - "note" => "4.5" - ), - array( - "id" => "1", - "nom" => "Quaso", - "img" => "4.jpg", - "note" => "4.5" - ), - array( - "id" => "1", - "nom" => "Quaso", - "img" => "4.jpg", - "note" => "4.5" - ) -); - -$array_categories = array( - "Type de cuisson" => $array_recepies_Type_de_cuisson, - "Temps de préparation" => $array_recepies_Type_de_cuisson, - "Difficulté" => $array_recepies_Type_de_cuisson, - "Végan" => $array_recepies_Type_de_cuisson, - "Sans gluten" => $array_recepies_Type_de_cuisson, - "Sans lactose" => $array_recepies_Type_de_cuisson -); -?> - - diff --git a/Views/category/view.php b/Views/category/view.php new file mode 100644 index 0000000..13aa765 --- /dev/null +++ b/Views/category/view.php @@ -0,0 +1,21 @@ + + +