summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TButtonColumn.php
diff options
context:
space:
mode:
authorxue <>2006-09-04 18:12:17 +0000
committerxue <>2006-09-04 18:12:17 +0000
commite83edc3f20163ac25e2307f9c854e7bc9384970c (patch)
treeb5b22b7255a7b56168cea239108958e9a0fd6893 /framework/Web/UI/WebControls/TButtonColumn.php
parent85509ff45f9ae8795b7f6ef2c58a45d8a574f939 (diff)
Finished updating code related with enumerable data types.
Diffstat (limited to 'framework/Web/UI/WebControls/TButtonColumn.php')
-rw-r--r--framework/Web/UI/WebControls/TButtonColumn.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/framework/Web/UI/WebControls/TButtonColumn.php b/framework/Web/UI/WebControls/TButtonColumn.php
index fdcf58d3..5f2c228d 100644
--- a/framework/Web/UI/WebControls/TButtonColumn.php
+++ b/framework/Web/UI/WebControls/TButtonColumn.php
@@ -152,19 +152,19 @@ class TButtonColumn extends TDataGridColumn
}
/**
- * @return string the type of command button. Defaults to LinkButton.
+ * @return TButtonColumnType the type of command button. Defaults to TButtonColumnType::LinkButton.
*/
public function getButtonType()
{
- return $this->getViewState('ButtonType','LinkButton');
+ return $this->getViewState('ButtonType',TButtonColumnType::LinkButton);
}
/**
- * @param string the type of command button, LinkButton, PushButton or ImageButton
+ * @param TButtonColumnType the type of command button
*/
public function setButtonType($value)
{
- $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'LinkButton','PushButton','ImageButton'),'LinkButton');
+ $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'TButtonColumnType'),TButtonColumnType::LinkButton);
}
/**
@@ -230,9 +230,9 @@ class TButtonColumn extends TDataGridColumn
if($itemType===TDataGrid::IT_ITEM || $itemType===TDataGrid::IT_ALTERNATINGITEM || $itemType===TDataGrid::IT_SELECTEDITEM || $itemType===TDataGrid::IT_EDITITEM)
{
$buttonType=$this->getButtonType();
- if($buttonType==='LinkButton')
+ if($buttonType===TButtonColumnType::LinkButton)
$button=new TLinkButton;
- else if($buttonType==='PushButton')
+ else if($buttonType===TButtonColumnType::PushButton)
$button=new TButton;
else // image button
{
@@ -243,7 +243,7 @@ class TButtonColumn extends TDataGridColumn
$button->setCommandName($this->getCommandName());
$button->setCausesValidation($this->getCausesValidation());
$button->setValidationGroup($this->getValidationGroup());
- if($this->getDataTextField()!=='' || ($buttonType==='ImageButton' && $this->getDataImageUrlField()!==''))
+ if($this->getDataTextField()!=='' || ($buttonType===TButtonColumnType::ImageButton && $this->getDataImageUrlField()!==''))
$button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
$cell->getControls()->add($button);
$cell->registerObject('Button',$button);