From dbf75ee045f0211035e7bc23f557cd66121ae7e1 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 14 Jan 2008 14:58:38 -0500 Subject: [PATCH] Instead of using the registry to get the PrinterNavigation system, add methods to set BSPrinterRootElementPage->navigator * PrinterRootElementPage.php: (BSPrinterRootElementPage::setNavigator): New method (BSPrinterRootElementPage::getNavigator): New method --- PrinterRootElementPage.php | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/PrinterRootElementPage.php b/PrinterRootElementPage.php index d75676b..14e622f 100644 --- a/PrinterRootElementPage.php +++ b/PrinterRootElementPage.php @@ -46,6 +46,12 @@ class BSPrinterRootElementPage extends BSPrinterRootElement */ private $title; + /** + * Navigation object + * @var BSPrinterNavigation + */ + private $navigator; + // ################################################################### /** * Constructor @@ -69,6 +75,26 @@ class BSPrinterRootElementPage extends BSPrinterRootElement return $obj->newInstanceArgs($args); } + /** + * Sets the navigation object + * + * @param BSPrinterNavigation Navigator + */ + public function setNavigation(BSPrinterNavigation $nav) + { + $this->navigator = $nav; + } + + /** + * Returns the printer navigation object + * + * @return BSPrinterNavigation Navigation object + */ + public function getNavigation() + { + return $this->navigatior; + } + // ################################################################### /** * Creates a redirect to another page; constructs the header and footer @@ -265,16 +291,16 @@ class BSPrinterRootElementPage extends BSPrinterRootElement echo "\n\t"; echo "\n\n\n"; - if (BSApp::GetType('PrinterNavigation') AND (!defined('ISSO_PRINTER_NO_NAVIGATION') OR !constant('ISSO_PRINTER_NO_NAVIGATION'))) + if ($this->navigator AND (!defined('ISSO_PRINTER_NO_NAVIGATION') OR !constant('ISSO_PRINTER_NO_NAVIGATION'))) { - echo BSApp::GetType('PrinterNavigation')->constructHeaderHtml(); + echo $this->navigator->constructHeaderHtml(); } echo $this->_paintChildren(); - if (BSApp::GetType('PrinterNavigation') AND (!defined('ISSO_PRINTER_NO_NAVIGATION') OR !constant('ISSO_PRINTER_NO_NAVIGATION'))) + if ($this->navigator AND (!defined('ISSO_PRINTER_NO_NAVIGATION') OR !constant('ISSO_PRINTER_NO_NAVIGATION'))) { - echo BSApp::GetType('PrinterNavigation')->constructFooterHtml(); + echo $this->navigator->constructFooterHtml(); } $copyright = "\n
\n

\n\t" . BSPrinter::get_copyright() . "\n

"; -- 2.22.5