/** * @param string URI of the image * @param string alternate text for the image */ public function __construct($src = null, $alt = null) { parent::__construct(); $this->control->type = 'image'; $this->control->src = $src; $this->control->alt = $alt; }
/** * @param string caption * @param string icon url */ public function __construct($caption = NULL, $icon = 'save') { parent::__construct($caption); if ($icon) { $this->iconPrototype->class = 'icon icon-' . $icon; } $this->control->setName("button")->type = 'submit'; $this->control->class[] = "button"; }
/** * @param string * @param string Kam se RequestButtonem dostanu (presenter a action). * @param array Kam se RequestButtonem dostanu (parametry). */ public function __construct($caption = NULL, $destination = NULL, $destinationArgs = array()) { parent::__construct($caption); parent::setValidationScope(false); $this->onClick = array(array($this, 'saveRequestAndRedirect')); $this->monitor('Nette\\Forms\\Form'); $this->monitor('Nette\\Application\\UI\\Presenter'); $this->setDestination($destination, $destinationArgs); }
/** * @param PayPal $payPal * @param string $caption */ public function __construct(PayPal $payPal, $caption = NULL) { parent::__construct($caption); $this->monitor('Nette\\Application\\UI\\Presenter'); $this->payPal = $payPal; $this->onClick[] = function (PayButton $button) use($payPal) { try { $button->onCheckout($button, $payPal); } catch (CheckoutRequestFailedException $e) { if (!$button->onError) { throw $e; } $button->onError($button, $e); } }; }
function __construct($src = NULL, $alt = NULL) { parent::__construct(); $this->control->type = 'image'; $this->control->src = $src; $this->control->alt = $alt; }
/** * @param string $caption * @param int $copyCount */ public function __construct($caption, $copyCount = 1) { parent::__construct($caption); $this->copyCount = $copyCount; }
/** * @param string * @param string|NULL */ public function __construct($channel, $caption = NULL) { parent::__construct($caption); $this->channel = $channel; }
/** * @param string Text v buttonu. */ public function __construct($caption = NULL) { parent::__construct($caption); parent::setValidationScope(false); $this->monitor('Nette\\Application\\UI\\Presenter'); }