From 7369988330bf8796d9cf2564756baf4eb46871ba Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 20 Jan 2015 22:34:11 +0100 Subject: one class per file: framework/Web/UI/ActiveControls --- .../TActiveTableRowEventParameter.php | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 framework/Web/UI/ActiveControls/TActiveTableRowEventParameter.php (limited to 'framework/Web/UI/ActiveControls/TActiveTableRowEventParameter.php') diff --git a/framework/Web/UI/ActiveControls/TActiveTableRowEventParameter.php b/framework/Web/UI/ActiveControls/TActiveTableRowEventParameter.php new file mode 100644 index 00000000..4500a282 --- /dev/null +++ b/framework/Web/UI/ActiveControls/TActiveTableRowEventParameter.php @@ -0,0 +1,56 @@ + + * @link http://www.landwehr-software.de/ + * @copyright Copyright © 2009 LANDWEHR Computer und Software GmbH + * @license http://www.pradosoft.com/license/ + * @package System.Web.UI.ActiveControls + * @version $Id$ + */ + +/** + * TActiveTableRowEventParameter class. + * + * The TActiveTableRowEventParameter provides the parameter passed during the callback + * requestion in the {@link getCallbackParameter CallbackParameter} property. The + * callback response content (e.g. new HTML content) must be rendered + * using an THtmlWriter obtained from the {@link getNewWriter NewWriter} + * property, which returns a NEW instance of TCallbackResponseWriter. + * + * The {@link getSelectedRowIndex SelectedRowIndex} is a zero-based index of the + * TActiveTableRow , -1 if the row is not part of the row collection (this shouldn't + * happen though since an exception is thrown before). + * + * @author LANDWEHR Computer und Software GmbH + * @package System.Web.UI.ActiveControls + * @since 3.1.9 + */ +class TActiveTableRowEventParameter extends TCallbackEventParameter +{ + /** + * @var integer the zero-based index of the row. + */ + private $_selectedRowIndex = -1; + + /** + * Creates a new TActiveTableRowEventParameter. + */ + public function __construct($response, $parameter, $index=-1) + { + parent::__construct($response, $parameter); + $this->_selectedRowIndex = $index; + } + + /** + * Returns the zero-based index of the {@link TActiveTableRow} within the + * {@link TTableRowCollection} of the parent {@link TTable} control. + * @return integer the zero-based index of the row. + */ + public function getSelectedRowIndex() + { + return $this->_selectedRowIndex; + } + +} \ No newline at end of file -- cgit v1.2.3