aboutsummaryrefslogtreecommitdiff
path: root/src/view/MainBuilder.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-09-26 12:04:02 +0200
committerpolo <ordipolo@gmx.fr>2025-09-26 12:04:02 +0200
commite93cd6c352a8e4fbb4e1174bdb15484adbe4c0f7 (patch)
tree7fd1591a25d3557f5869a688bad28db533d6b414 /src/view/MainBuilder.php
parentf977313ff095a10478291334109d9aae40528a34 (diff)
downloadcms-e93cd6c352a8e4fbb4e1174bdb15484adbe4c0f7.zip
suppression table Presentation
Diffstat (limited to 'src/view/MainBuilder.php')
-rw-r--r--src/view/MainBuilder.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/view/MainBuilder.php b/src/view/MainBuilder.php
index 8a40d82..2510b08 100644
--- a/src/view/MainBuilder.php
+++ b/src/view/MainBuilder.php
@@ -55,14 +55,11 @@ class MainBuilder extends AbstractBuilder
55 // mode modification de page uniquement 55 // mode modification de page uniquement
56 private function viewEditBlocks($node): void 56 private function viewEditBlocks($node): void
57 { 57 {
58 $blocks = Blocks::getTypeNamePairs();
59
60 $options = ''; 58 $options = '';
61 for($i = 0; $i < count($blocks); $i++){ 59 foreach(Blocks::$blocks as $key => $value){
62 $options .= '<option value= "' . $blocks[$i]['type'] . '">' . $blocks[$i]['name'] . "</option>\n"; 60 $options .= '<option value= "' . $key . '">' . $value . "</option>\n";
63 } 61 }
64 62
65 //$page_id = Director::$page_path->getLast()->getId();
66 $head_node = null; 63 $head_node = null;
67 foreach(ViewController::$root_node->getChildren() as $first_level_node){ 64 foreach(ViewController::$root_node->getChildren() as $first_level_node){
68 if($first_level_node->getName() === 'head'){ 65 if($first_level_node->getName() === 'head'){
@@ -88,7 +85,7 @@ class MainBuilder extends AbstractBuilder
88 private function makePresentationOptions(string $presentation): string 85 private function makePresentationOptions(string $presentation): string
89 { 86 {
90 $options = ''; 87 $options = '';
91 foreach(Presentation::$option_list as $key => $value){ 88 foreach(Blocks::$presentations as $key => $value){
92 $options .= '<option value="' . $key . '" ' . ($presentation === $key ? 'selected' : '') . '>' . $value . '</option>'; 89 $options .= '<option value="' . $key . '" ' . ($presentation === $key ? 'selected' : '') . '>' . $value . '</option>';
93 } 90 }
94 return $options; 91 return $options;