Example #1
0
 /**
  * @return array
  */
 public function getErrors()
 {
     if (!$this->form->getIsBound()) {
         return array();
     }
     if (!$this->isValidated) {
         $this->validate();
     }
     return $this->errors;
 }
Example #2
0
 /**
  * @param Form $form
  */
 private function logInvalidSubscription($form)
 {
     $error = 'Could not synchronize user ' . $form->getField('EMAIL')->getValue() . ":\n";
     /** @var Field $field */
     foreach ($form->getFields(TRUE) as $field) {
         foreach ($field->getErrors() as $error) {
             $error .= $field->getName() . ': ' . $this->translate($error) . "\n";
         }
     }
     GeneralUtility::sysLog($error, 't3chimp', 2);
 }
Example #3
0
 /**
  * @param Form $form
  */
 protected function writeToCache(Form $form)
 {
     if ($this->settingsProvider->getIsCacheDisabled()) {
         return;
     }
     $cachePath = $this->getCachePath('');
     if (!file_exists($cachePath)) {
         mkdir($cachePath, 0777, TRUE);
         file_put_contents($this->getCachePath('index.html'), '');
     }
     $file = $this->getCachePath($form->getListId() . '.mc');
     file_put_contents($file, serialize($form));
 }