Prado\Web\UI\WebControls\TImageButton::setCommandName PHP Метод

setCommandName() публичный Метод

public setCommandName ( $value )
    public function setCommandName($value)
    {
        $this->setViewState('CommandName', $value, '');
    }

Usage Example

Пример #1
0
 /**
  * Creates a navigation button.
  * It creates a {@link TButton}, {@link TLinkButton}, or {@link TImageButton},
  * depending on the given parameters.
  * @param TWizardNavigationButtonStyle button style
  * @param boolean whether the button should cause validation
  * @param string command name for the button's OnCommand event
  * @throws TInvalidDataValueException if the button type is not recognized
  */
 protected function createNavigationButton($buttonStyle, $causesValidation, $commandName)
 {
     switch ($buttonStyle->getButtonType()) {
         case TWizardNavigationButtonType::Button:
             $button = new TButton();
             break;
         case TWizardNavigationButtonType::Link:
             $button = new TLinkButton();
             break;
         case TWizardNavigationButtonType::Image:
             $button = new TImageButton();
             $button->setImageUrl($buttonStyle->getImageUrl());
             break;
         default:
             throw new TInvalidDataValueException('wizard_buttontype_unknown', $buttonStyle->getButtonType());
     }
     $button->setText($buttonStyle->getButtonText());
     $button->setCausesValidation($causesValidation);
     $button->setCommandName($commandName);
     return $button;
 }
All Usage Examples Of Prado\Web\UI\WebControls\TImageButton::setCommandName