getName() . '.php'; if(file_exists($viewFile)) { /*if(!empty($node->getNodeData()->getData())) { extract($node->getNodeData()->getData()); }*/ if($_SESSION['admin']){ $this->unfoldMenu(Director::$menu_data); if($template){ $this->unfoldOptions(Director::$menu_data); } } else{ header('Location: ' . new URL); die; } // si faux, n'utilise pas le template if($template){ ob_start(); require $viewFile; // insertion de $this->html généré par unfoldMenu $this->html = ob_get_clean(); // pas de concaténation .= cette fois on écrase } } } private function unfoldMenu(Page $page): void { $this->html .= '