Beispiel #1
0
 public function storeToMailchimp(Form $form)
 {
     $data = $form->getRawData();
     list($data['first_name'], $data['last_name']) = explode(' ', $data['name_surname'], 2);
     $mailchimp = new MailchimpAPI($this->apiKey, ['ssl_verifypeer' => false]);
     return $mailchimp->lists->subscribe($this->listId, ['email' => $data['email']], ['first_name' => $data['first_name'], 'last_name' => $data['last_name']], 'html', true, true, false, true);
 }
Beispiel #2
0
 public function resolveGet()
 {
     /**
      * Initialize fields.
      */
     $this->form->initFields();
     /**
      * Fill form with session data.
      */
     $this->form->populateFromSession();
     return $this->form;
 }
Beispiel #3
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     foreach ($this->decoratorFactory->create([BootstrapDecoratorWrapper::class]) as $decorator) {
         $this->addDecorator($decorator);
     }
 }