From 1c246fe006519caa7dadabd3732671709a5deb0c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 19 Mar 2006 18:55:13 +0000 Subject: [PATCH] Hook is now done like the one in ISSO.Template so we have consistency --- printer.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/printer.php b/printer.php index 093b286..93b731d 100644 --- a/printer.php +++ b/printer.php @@ -39,7 +39,7 @@ * box) from being printed * * Hooks: -* _printer_page_start() - Define function to echo() data after the page header +* $this->page_start_hook - Define function to echo() data after the page header * has been outputted * * @author Iris Studios, Inc. @@ -78,13 +78,21 @@ class Printer */ var $code = ''; + /** + * Page-start hooko + * @var string + * @access private + */ + var $page_start_hook = ':=NO METHOD=:'; + /** * Fields array that is used in this module * @var array * @access private */ var $fields = array( - 'realm' => array(REQ_YES, null, false) + 'realm' => array(REQ_YES, null, false), + 'page_start_hook' => array(REQ_NO, null, false) ); // ################################################################### @@ -294,9 +302,9 @@ JS; echo ($extra ? "\n$extra" : ''); echo "\n\n\n"; - if (!defined('ISSO_PRINTER_HIDE_SETUP') AND function_exists('_printer_page_start')) + if (is_callable($this->page_start_hook)) { - _printer_page_start(); + call_user_func($this->page_start_hook); } echo "
\n\n\n"; -- 2.43.5