Prado\Web\UI\WebControls\TDataGrid::createPagerButton PHP 메소드

createPagerButton() 보호된 메소드

Depending on the button type, a TLinkButton or a TButton may be created. If it is enabled (clickable), its command name and parameter will also be set. Derived classes may override this method to create additional types of buttons, such as TImageButton.
protected createPagerButton ( $pager, $buttonType, $enabled, $text, $commandName, $commandParameter ) : mixed
리턴 mixed the button instance
    protected function createPagerButton($pager, $buttonType, $enabled, $text, $commandName, $commandParameter)
    {
        if ($buttonType === TDataGridPagerButtonType::LinkButton) {
            if ($enabled) {
                $button = new TLinkButton();
            } else {
                $button = new TLabel();
                $button->setText($text);
                return $button;
            }
        } else {
            $button = new TButton();
            if (!$enabled) {
                $button->setEnabled(false);
            }
        }
        $button->setText($text);
        $button->setCommandName($commandName);
        $button->setCommandParameter($commandParameter);
        $button->setCausesValidation(false);
        return $button;
    }