/**
  * @return bool
  */
 public function handle()
 {
     $this->form->cleanupFields();
     if (!$this->form->isSubmitted() || !$this->isValid()) {
         return false;
     }
     $this->settings->set('Analytics', 'web_property_id', $this->form->getField('web_property_id')->getValue());
     return true;
 }
 /**
  * @return bool
  */
 public function handle()
 {
     $this->form->cleanupFields();
     if (!$this->form->isSubmitted() || !$this->isValid()) {
         return false;
     }
     $certificate = base64_encode(file_get_contents($this->form->getField('certificate')->getTempFileName()));
     $this->settings->set('Analytics', 'certificate', $certificate);
     $this->settings->set('Analytics', 'email', $this->form->getField('email')->getValue());
     return true;
 }
Ejemplo n.º 3
0
 /**
  * @return bool
  */
 public function handle()
 {
     $this->form->cleanupFields();
     if (!$this->form->isSubmitted() || !$this->isValid()) {
         return false;
     }
     $fields = $this->form->getFields();
     $newStartDate = Model::getUTCTimestamp($fields['start_date']);
     $newEndDate = Model::getUTCTimestamp($fields['end_date']);
     $this->dateRange->update($newStartDate, $newEndDate);
     return true;
 }