/**
  * @param string $name
  */
 public function __construct(string $name = null)
 {
     self::translator()->addFile(__DIR__ . '/../../../lang/global', 'bootstrap');
     $this->addClass('cawa-fieldset-creditcard');
     $this->add(($creditCard = new CreditCard($name ? $name . '[card]' : null))->setRequired()->setValue('4242424242424242'))->add((new Group(''))->add((new CreditCardExpiry($name ? $name . '[expiration]' : null))->setRequired()->setValue('01 / 18'))->add((new CreditCardCvc($name ? $name . '[cvv]' : null))->setCardCredit($creditCard)->setRequired()->setValue('123')));
     parent::__construct();
 }
Beispiel #2
0
 /**
  * @param string $name
  * @param string|null $label
  */
 public function __construct(string $name, string $label = null)
 {
     parent::__construct();
     $this->main = new Text($name . '[text]', $label);
     $this->hidden = new Hidden($name . '[data]');
     $this->add($this->main)->add($this->hidden);
     $this->main->getField()->addClass('cawa-fields-googleplace')->addAttribute('data-key', DI::config()->get('googleMaps/apikey'));
 }