public function transform($data, $target)
 {
     $data = $this->cleanUpBlanks($data);
     $value = $this->propertyMapper->convert($data, $target, \Admin\Core\PropertyMappingConfiguration::getConfiguration());
     $this->validationResults = $this->propertyMapper->getMessages();
     $validator = $this->validatorResolver->getBaseValidatorConjunction($target);
     $validationMessages = $validator->validate($value);
     $this->validationResults->merge($validationMessages);
     $errors = $this->validationResults->getFlattenedErrors();
     if (empty($errors)) {
         return $value;
     } else {
         return $errors;
     }
 }
Example #2
0
 public function __toString()
 {
     $value = $this->parentProperty->getValue();
     $options = array(array('TYPO3\\FLOW3\\Property\\TypeConverter\\DateTimeConverter', \TYPO3\FLOW3\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT, $this->parentProperty->representation->datetimeFormat));
     return $this->propertyMapper->convert($value, "string", \Admin\Core\PropertyMappingConfiguration::getConfiguration('\\Admin\\Core\\PropertyMappingConfiguration', $options));
 }