Ejemplo n.º 1
0
 /**
  * @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;
 }
Ejemplo n.º 2
0
 /**
  * @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";
 }
Ejemplo n.º 3
0
 /**
  * @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);
 }
Ejemplo n.º 4
0
 /**
  * @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);
         }
     };
 }
Ejemplo n.º 5
0
 function __construct($src = NULL, $alt = NULL)
 {
     parent::__construct();
     $this->control->type = 'image';
     $this->control->src = $src;
     $this->control->alt = $alt;
 }
Ejemplo n.º 6
0
 /**
  * @param string $caption
  * @param int $copyCount
  */
 public function __construct($caption, $copyCount = 1)
 {
     parent::__construct($caption);
     $this->copyCount = $copyCount;
 }
Ejemplo n.º 7
0
 /**
  * @param  string
  * @param  string|NULL
  */
 public function __construct($channel, $caption = NULL)
 {
     parent::__construct($caption);
     $this->channel = $channel;
 }
Ejemplo n.º 8
0
 /**
  * @param string Text v buttonu.
  */
 public function __construct($caption = NULL)
 {
     parent::__construct($caption);
     parent::setValidationScope(false);
     $this->monitor('Nette\\Application\\UI\\Presenter');
 }