public function CommerceSmartImporerService::createEmail in Commerce Smart Importer 8
Creates email value based on field settings.
1 call to CommerceSmartImporerService::createEmail()
- CommerceSmartImporerService::formatField in src/
Plugin/ CommerceSmartImporerService.php - Formats one field value based on field settings.
File
- src/
Plugin/ CommerceSmartImporerService.php, line 725 - Main Commerce Smart Importer Service.
Class
- CommerceSmartImporerService
- This is main Commerce Smart Importer Service.
Namespace
Drupal\commerce_smart_importer\PluginCode
public function createEmail($email, $field_settings) {
if (filter_var(trim($email), FILTER_VALIDATE_EMAIL)) {
return trim($email);
}
else {
throw new Exception("Timestamp is not valid");
}
}