* @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @package Prado\Web\UI\WebControls */ namespace Prado\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 * @package Prado\Web\UI\WebControls * @since 3.0.2 */ class TPagerPageChangedEventParameter extends \Prado\TEventParameter { /** * @var integer new page index */ private $_newIndex; /** * @var TControl original event sender */ private $_source=null; /** * Constructor. * @param TControl the control originally raises the OnCommand event. * @param integer new page index */ public function __construct($source,$newPageIndex) { $this->_source=$source; $this->_newIndex=$newPageIndex; } /** * @return TControl the control originally raises the OnCommand event. */ public function getCommandSource() { return $this->_source; } /** * @return integer new page index */ public function getNewPageIndex() { return $this->_newIndex; } }