public function CommerceSmartImporerService::exportCurrency in Commerce Smart Importer 8
Helper function for exportField.
Exports Currency.
1 call to CommerceSmartImporerService::exportCurrency()
- CommerceSmartImporerService::exportField in src/
Plugin/ CommerceSmartImporerService.php - Force different types of fields to string.
File
- src/
Plugin/ CommerceSmartImporerService.php, line 1658 - Main Commerce Smart Importer Service.
Class
- CommerceSmartImporerService
- This is main Commerce Smart Importer Service.
Namespace
Drupal\commerce_smart_importer\PluginCode
public function exportCurrency($entity) {
$value = $entity
->get('price');
$field = current($value
->getValue());
return $field['currency_code'];
}