Methods renderMenu() and transferContentToTemplateEngine() added
authorRoland Häder <roland@mxchange.org>
Mon, 31 Aug 2009 21:23:00 +0000 (21:23 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 31 Aug 2009 21:23:00 +0000 (21:23 +0000)
inc/classes/interfaces/menu/class_RenderableMenu.php
inc/classes/main/menu/class_BaseMenu.php

index be12780baae00d3b09f5722d0f308d39cf03d968..23c5a4cafcdbb843a81897931847b48952a653f2 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface RenderableMenu extends FrameworkInterface {
+       /**
+        * Renders the menu by loading the base template and a menu-specific
+        * template.
+        *
+        * @return      void
+        */
+       function renderMenu ();
+
+       /**
+        * Transfers the rendered menu to a given templatex engine by assigning
+        * the rendered content with a template variable.
+        *
+        * @2param      $templateInstance       An instance of a CompileableTemplate class
+        * @return      void
+        */
+       function transferContentToTemplateEngine (CompileableTemplate $templateInstance);
 }
 
-//
+// [EOF]
 ?>
index 2dc81496736bd87562d263955fd552d6fbb6e3cd..e5c4db3352d2cdb67ea2ceb5d6a894f0ff831b32 100644 (file)
@@ -32,6 +32,27 @@ class BaseMenu extends BaseFrameworkSystem {
                // Call parent constructor
                parent::__construct($className);
        }
+
+       /**
+        * Renders the menu by loading the base template and a menu-specific
+        * template.
+        *
+        * @return      void
+        */
+       public function renderMenu () {
+               $this->partialStub('Please implement this method.');
+       }
+
+       /**
+        * Transfers the rendered menu to a given templatex engine by assigning
+        * the rendered content with a template variable.
+        *
+        * @2param      $templateInstance       An instance of a CompileableTemplate class
+        * @return      void
+        */
+       public function transferContentToTemplateEngine (CompileableTemplate $templateInstance) {
+               $this->partialStub('templaateInstance=' . $templateInstance->__toString());
+       }
 }
 
 // [EOF]