diff options
Diffstat (limited to 'src/view/MainBuilder.php')
| -rw-r--r-- | src/view/MainBuilder.php | 9 |
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; |
