From 169950e09cad0e69a7dcbcdabe7ef86086766483 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 20 Jan 2015 19:22:34 +0100 Subject: One class per file: framework/Collections/ --- .../TPagedListPageChangedEventParameter.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 framework/Collections/TPagedListPageChangedEventParameter.php (limited to 'framework/Collections/TPagedListPageChangedEventParameter.php') diff --git a/framework/Collections/TPagedListPageChangedEventParameter.php b/framework/Collections/TPagedListPageChangedEventParameter.php new file mode 100644 index 00000000..9b9f500e --- /dev/null +++ b/framework/Collections/TPagedListPageChangedEventParameter.php @@ -0,0 +1,42 @@ + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2014 PradoSoft + * @license http://www.pradosoft.com/license/ + * @package System.Collections + */ + +/** + * TPagedListPageChangedEventParameter class. + * TPagedListPageChangedEventParameter is used as the parameter for + * {@link TPagedList::onPageChanged OnPageChanged} event. + * To obtain the page index before it was changed, use {@link getOldPageIndex OldPageIndex}. + * + * @author Qiang Xue + * @package System.Collections + * @since 3.0 + */ +class TPagedListPageChangedEventParameter extends TEventParameter +{ + private $_oldPage; + + /** + * Constructor. + * @param integer old page index + */ + public function __construct($oldPage) + { + $this->_oldPage=$oldPage; + } + + /** + * @return integer the index of the page before the list changed to the new page + */ + public function getOldPageIndex() + { + return $this->_oldPage; + } +} \ No newline at end of file -- cgit v1.2.3