]> git.mxchange.org Git - core.git/commitdiff
Basicly finished menu rendering (wow).
authorRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 20:25:03 +0000 (22:25 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 20:25:03 +0000 (22:25 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/menu/class_BaseMenu.php
inc/classes/main/template/menu/class_MenuTemplateEngine.php

index fa32207b36aa7bf6ab7612a48379942d3ae8a0fc..1f3512b62c0492dc5ad4a5cb9989d6da4acb8998 100644 (file)
@@ -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();
        }
 }
 
index e11548fb5f7b5bbf698f7b32c266cbc8d024988c..d118bae7b03124f7c185f0de1141e00381ec8dca 100644 (file)
@@ -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)
         *