From 14691cd854be3e9ee272c9619a6368c83d72267b Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sat, 18 Feb 2012 00:07:50 +0000 Subject: upload new EasyGiant library and added added a new filter for the model name (part 2) --- h-source/Library/Helper/Pages.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'h-source/Library/Helper/Pages.php') diff --git a/h-source/Library/Helper/Pages.php b/h-source/Library/Helper/Pages.php index a6e3287..64e2649 100755 --- a/h-source/Library/Helper/Pages.php +++ b/h-source/Library/Helper/Pages.php @@ -22,7 +22,7 @@ if (!defined('EG')) die('Direct access not allowed!'); -//Helper class to create the HTML of the page division list +//Helper class to create the HTML of the page list class Helper_Pages extends Helper_Html { @@ -31,17 +31,24 @@ class Helper_Pages extends Helper_Html protected $_numbOfPages; //number of pages protected $_variableArg = ''; //value of the $viewArgs key that has to be modified - public $previousString; //string of the link to the previous page - public $nextString; //string of the link to the next page + public $previousString = null; //string of the link to the previous page + public $nextString = null; //string of the link to the next page + + //instance of Lang_{language}_Generic + public $strings = null; + + public function __construct() + { + //get the generic language class + $this->strings = Factory_Strings::generic(Params::$language); + } public function build($urlViewAction = '' , $variableArg = 'page', $previousString = 'previous', $nextString = 'next') { - $this->_variableArg = $variableArg; $this->_urlViewAction =$urlViewAction; //url of the controller and (/) main action - $this->previousString = $previousString; - $this->nextString = $nextString; - + $this->previousString = $this->strings->gtext($previousString); + $this->nextString = $this->strings->gtext($nextString); } //return the number of pages -- cgit v1.2.3