Prado\Web\UI\ActiveControls\TActivePager::createPagerButton PHP Метод

createPagerButton() защищенный Метод

Override parent implementation to create, depending on the button type, a TActiveLinkButton, a TActiveButton or a TActiveImageButton may be created.
protected createPagerButton ( $buttonType, $enabled, $text, $commandName, $commandParameter ) : mixed
Результат mixed the button instance
    protected function createPagerButton($buttonType, $enabled, $text, $commandName, $commandParameter)
    {
        if ($buttonType === TPagerButtonType::LinkButton) {
            if ($enabled) {
                $button = new TActiveLinkButton();
            } else {
                $button = new TLabel();
                $button->setText($text);
                $button->setCssClass($this->getButtonCssClass());
                return $button;
            }
        } else {
            if ($buttonType === TPagerButtonType::ImageButton) {
                $button = new TActiveImageButton();
                $button->setImageUrl($this->getPageImageUrl($text, $commandName));
                if ($enabled) {
                    $button->Visible = true;
                } else {
                    $button->Visible = false;
                }
            } else {
                $button = new TActiveButton();
                if (!$enabled) {
                    $button->setEnabled(false);
                }
            }
        }
        if ($buttonType === TPagerButtonType::ImageButton) {
            $button->ImageUrl = $text;
        }
        $button->setText($text);
        $button->setCommandName($commandName);
        $button->setCommandParameter($commandParameter);
        $button->setCausesValidation(false);
        $button->setCssClass($this->getButtonCssClass());
        $button->attachEventHandler('OnCallback', array($this, 'handleCallback'));
        $button->getAdapter()->getBaseActiveControl()->setClientSide($this->getClientSide());
        return $button;
    }