/** * @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); } }
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() . '" />'; }
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>'; }
public function process(Customweb_Form_IButton $pressedButton, array $formData) { if ($pressedButton->getMachineName() === 'save') { $this->getSettingHandler()->processForm($this, $formData); } }