예제 #1
0
 /**
  * @param Customweb_Form_IButton $button
  */
 public function __construct(Customweb_Form_IButton $button = null)
 {
     if ($button !== null) {
         $this->setId($button->getId());
         $this->setMachineName($button->getMachineName());
         $this->setTitle($button->getTitle());
         $this->setType($button->getType());
     } else {
         $this->setId(Customweb_Core_Util_Rand::getUuid());
         $this->setType(self::TYPE_DEFAULT);
     }
 }
예제 #2
0
 public function renderButton(Customweb_Form_IButton $button)
 {
     return '<input type="submit" name="button[' . $button->getMachineName() . ']" value="' . $button->getTitle() . '" class="' . $this->getButtonClasses($button) . '" id="' . $button->getId() . '" />';
 }
예제 #3
0
 public function renderButton(Customweb_Form_IButton $button)
 {
     return '<button type="submit" name="button[' . $button->getMachineName() . ']" title="' . $button->getTitle() . '" id="' . $button->getId() . '" class="button ' . $this->getButtonClass() . '"><span><span>' . $button->getTitle() . '</span></span></button>';
 }
예제 #4
0
 public function process(Customweb_Form_IButton $pressedButton, array $formData)
 {
     if ($pressedButton->getMachineName() === 'save') {
         $this->getSettingHandler()->processForm($this, $formData);
     }
 }