From: Robert Sesek Date: Mon, 14 Jan 2008 19:58:38 +0000 (-0500) Subject: Instead of using the registry to get the PrinterNavigation system, add methods to... X-Git-Tag: 3.0.0~24 X-Git-Url: https://src.bluestatic.org/?a=commitdiff_plain;h=dbf75ee045f0211035e7bc23f557cd66121ae7e1;p=isso.git 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 --- 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

";