protected function createPagerButton($buttonType, $enabled, $text, $commandName, $commandParameter)
{
if ($buttonType === TPagerButtonType::LinkButton) {
if ($enabled) {
$button = new TLinkButton();
} else {
$button = new TLabel();
$button->setText($text);
$button->setCssClass($this->getButtonCssClass());
return $button;
}
} else {
if ($buttonType === TPagerButtonType::ImageButton) {
$button = new TImageButton();
$button->setImageUrl($this->getPageImageUrl($text, $commandName));
} else {
$button = new TButton();
}
if (!$enabled) {
$button->setEnabled(false);
}
}
$button->setText($text);
$button->setCommandName($commandName);
$button->setCommandParameter($commandParameter);
$button->setCausesValidation(false);
$button->setCssClass($this->getButtonCssClass());
return $button;
}