From: Roland Haeder Date: Sun, 5 Apr 2015 20:25:03 +0000 (+0200) Subject: Basicly finished menu rendering (wow). X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b9150fa200886f629ea33f37e06690ee56292972;p=core.git Basicly finished menu rendering (wow). Signed-off-by: Roland Häder --- diff --git a/inc/classes/main/menu/class_BaseMenu.php b/inc/classes/main/menu/class_BaseMenu.php index fa32207b..1f3512b6 100644 --- a/inc/classes/main/menu/class_BaseMenu.php +++ b/inc/classes/main/menu/class_BaseMenu.php @@ -79,8 +79,9 @@ class BaseMenu extends BaseFrameworkSystem { * @return void */ public function transferContentToTemplateEngine (CompileableTemplate $templateInstance) { - $this->debugInstance(); - $this->partialStub('templateInstance=' . $templateInstance->__toString()); + // Assign menu content to variable + $templateInstance->assignVariable('menu_content', $this->getTemplateInstance()->getMenuContent()); + //* DEBUG */ $templateInstance->debugInstance(); } } diff --git a/inc/classes/main/template/menu/class_MenuTemplateEngine.php b/inc/classes/main/template/menu/class_MenuTemplateEngine.php index e11548fb..d118bae7 100644 --- a/inc/classes/main/template/menu/class_MenuTemplateEngine.php +++ b/inc/classes/main/template/menu/class_MenuTemplateEngine.php @@ -828,6 +828,22 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla $this->menuEntries = array(); } + /** + * "Getter" for menu content + * + * @return $menuContent Returned menu content + */ + public function getMenuContent () { + // Implode menuBlocks + $menuContent = implode('', $this->menuBlocks); + + // Clean variable + $this->menuBlocks = array(); + + // And return it + return $menuContent; + } + /** * Getter for menu cache file (FQFN) *