summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php')
-rw-r--r--framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php b/framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php
new file mode 100644
index 00000000..d9f187e0
--- /dev/null
+++ b/framework/Web/UI/WebControls/TPagerPageChangedEventParameter.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * TPager 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.Web.UI.WebControls
+ */
+
+/**
+ * TPagerPageChangedEventParameter class
+ *
+ * TPagerPageChangedEventParameter encapsulates the parameter data for
+ * {@link TPager::onPageIndexChanged PageIndexChanged} event of {@link TPager} controls.
+ *
+ * The {@link getCommandSource CommandSource} property refers to the control
+ * that originally raises the OnCommand event, while {@link getNewPageIndex NewPageIndex}
+ * returns the new page index carried with the page command.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package System.Web.UI.WebControls
+ * @since 3.0.2
+ */
+class TPagerPageChangedEventParameter extends TEventParameter
+{
+ /**
+ * @var integer new page index
+ */
+ private $_newIndex;
+ /**
+ * @var TControl original event sender
+ */
+ private $_source=null;
+
+ /**
+ * Constructor.
+ * @param TControl the control originally raises the <b>OnCommand</b> event.
+ * @param integer new page index
+ */
+ public function __construct($source,$newPageIndex)
+ {
+ $this->_source=$source;
+ $this->_newIndex=$newPageIndex;
+ }
+
+ /**
+ * @return TControl the control originally raises the <b>OnCommand</b> event.
+ */
+ public function getCommandSource()
+ {
+ return $this->_source;
+ }
+
+ /**
+ * @return integer new page index
+ */
+ public function getNewPageIndex()
+ {
+ return $this->_newIndex;
+ }
+} \ No newline at end of file