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