diff options
author | xue <> | 2006-09-04 18:12:17 +0000 |
---|---|---|
committer | xue <> | 2006-09-04 18:12:17 +0000 |
commit | e83edc3f20163ac25e2307f9c854e7bc9384970c (patch) | |
tree | b5b22b7255a7b56168cea239108958e9a0fd6893 /framework/Web/UI/WebControls/TTableRow.php | |
parent | 85509ff45f9ae8795b7f6ef2c58a45d8a574f939 (diff) |
Finished updating code related with enumerable data types.
Diffstat (limited to 'framework/Web/UI/WebControls/TTableRow.php')
-rw-r--r-- | framework/Web/UI/WebControls/TTableRow.php | 32 |
1 files changed, 27 insertions, 5 deletions
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 <qiang.xue@gmail.com>
+ * @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 |