protected function createButton($commandName, $text, $causesValidation, $validationGroup)
{
if ($this->getButtonType() === TButtonColumnType::LinkButton) {
$button = new TLinkButton();
} else {
if ($this->getButtonType() === TButtonColumnType::PushButton) {
$button = new TButton();
} else {
$button = new TImageButton();
if (strcasecmp($commandName, 'Update') === 0) {
$url = $this->getUpdateImageUrl();
} else {
if (strcasecmp($commandName, 'Cancel') === 0) {
$url = $this->getCancelImageUrl();
} else {
$url = $this->getEditImageUrl();
}
}
$button->setImageUrl($url);
}
}
$button->setText($text);
$button->setCommandName($commandName);
$button->setCausesValidation($causesValidation);
$button->setValidationGroup($validationGroup);
return $button;
}