From: Roland Häder Date: Mon, 31 Aug 2009 21:23:00 +0000 (+0000) Subject: Methods renderMenu() and transferContentToTemplateEngine() added X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=ede85e5640872d6c88a25ddf3f809e6d281ef205 Methods renderMenu() and transferContentToTemplateEngine() added --- 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]