blob: 1965640e3a800d5a5e06add1c3f196f7a5c448d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
<?php
/**
* TActiveTableRow and TActiveTableRowEventParameter class file
*
* @author LANDWEHR Computer und Software GmbH <programmierung@landwehr-software.de>
* @link http://www.landwehr-software.de/
* @copyright Copyright © 2009 LANDWEHR Computer und Software GmbH
* @license http://www.pradosoft.com/license/
* @package Prado\Web\UI\ActiveControls
*/
namespace Prado\Web\UI\ActiveControls;
/**
* 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 <b>NEW</b> 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 <programmierung@landwehr-software.de>
* @package Prado\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;
}
}
|