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 fa32207..1f3512b 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 e11548f..d118bae 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)
         *