From e83edc3f20163ac25e2307f9c854e7bc9384970c Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 4 Sep 2006 18:12:17 +0000 Subject: Finished updating code related with enumerable data types. --- framework/Web/UI/WebControls/TTableRow.php | 32 +++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'framework/Web/UI/WebControls/TTableRow.php') diff --git a/framework/Web/UI/WebControls/TTableRow.php b/framework/Web/UI/WebControls/TTableRow.php index b0e0bfbe..d4bf7984 100644 --- a/framework/Web/UI/WebControls/TTableRow.php +++ b/framework/Web/UI/WebControls/TTableRow.php @@ -121,20 +121,19 @@ class TTableRow extends TWebControl } /** - * @return string location of a row in a table. Defaults to 'Body'. + * @return TTableRowSection location of a row in a table. Defaults to TTableRowSection::Body. */ public function getTableSection() { - return $this->getViewState('TableSection','Body'); + return $this->getViewState('TableSection',TTableRowSection::Body); } /** - * @param string location of a row in a table. Valid values include 'Header', 'Footer' and 'Body'. + * @param TTableRowSection location of a row in a table. */ public function setTableSection($value) { - $value=TPropertyValue::ensureEnum($value,'Header','Body','Footer'); - $this->setViewState('TableSection',$value,'Body'); + $this->setViewState('TableSection',TPropertyValue::ensureEnum($value,'TTableRowSection'),TTableRowSection::Body); } /** @@ -184,4 +183,27 @@ class TTableCellCollection extends TControlCollection } } + +/** + * TTableRowSection class. + * TTableRowSection defines the enumerable type for the possible table sections + * that a {@link TTableRow} can be within. + * + * The following enumerable values are defined: + * - Header: in table header + * - Body: in table body + * - Footer: in table footer + * + * @author Qiang Xue + * @version $Revision: $ $Date: $ + * @package System.Web.UI.WebControls + * @since 3.0.4 + */ +class TTableRowSection extends TEnumerable +{ + const Header='Header'; + const Body='Body'; + const Footer='Footer'; +} + ?> \ No newline at end of file -- cgit v1.2.3