diff options
Diffstat (limited to 'framework/Collections/TPagedListPageChangedEventParameter.php')
-rw-r--r-- | framework/Collections/TPagedListPageChangedEventParameter.php | 42 |
1 files changed, 42 insertions, 0 deletions
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 @@ +<?php +/** + * TPagedList, TPagedListFetchDataEventParameter, TPagedListPageChangedEventParameter class file + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @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 <qiang.xue@gmail.com> + * @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 |