From ede85e5640872d6c88a25ddf3f809e6d281ef205 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 31 Aug 2009 21:23:00 +0000 Subject: [PATCH] Methods renderMenu() and transferContentToTemplateEngine() added --- .../interfaces/menu/class_RenderableMenu.php | 18 +++++++++++++++- inc/classes/main/menu/class_BaseMenu.php | 21 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/inc/classes/interfaces/menu/class_RenderableMenu.php b/inc/classes/interfaces/menu/class_RenderableMenu.php index be12780b..23c5a4ca 100644 --- a/inc/classes/interfaces/menu/class_RenderableMenu.php +++ b/inc/classes/interfaces/menu/class_RenderableMenu.php @@ -22,7 +22,23 @@ * along with this program. If not, see . */ 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] ?> diff --git a/inc/classes/main/menu/class_BaseMenu.php b/inc/classes/main/menu/class_BaseMenu.php index 2dc81496..e5c4db33 100644 --- a/inc/classes/main/menu/class_BaseMenu.php +++ b/inc/classes/main/menu/class_BaseMenu.php @@ -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] -- 2.39.5