summaryrefslogtreecommitdiff
path: root/framework/Collections/TPagedListPageChangedEventParameter.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2015-01-20 19:22:34 +0100
committerFabio Bas <ctrlaltca@gmail.com>2015-01-20 19:22:34 +0100
commit169950e09cad0e69a7dcbcdabe7ef86086766483 (patch)
treeadfd97a9f81f77ba424092b22504039cf38def0e /framework/Collections/TPagedListPageChangedEventParameter.php
parentd45b5615d48bff5373a6cda0728cb26332c3d962 (diff)
One class per file: framework/Collections/
Diffstat (limited to 'framework/Collections/TPagedListPageChangedEventParameter.php')
-rw-r--r--framework/Collections/TPagedListPageChangedEventParameter.php42
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 &copy; 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