public function CommerceSmartImporerService::requiredPass in Commerce Smart Importer 8
Helper function for createNewProduct.
2 calls to CommerceSmartImporerService::requiredPass()
- CommerceSmartImporerService::createNewProduct in src/
Plugin/ CommerceSmartImporerService.php - Creates product.
- CommerceSmartImporerService::updateProduct in src/
Plugin/ CommerceSmartImporerService.php - Updates entity with given values.
File
- src/
Plugin/ CommerceSmartImporerService.php, line 1452 - Main Commerce Smart Importer Service.
Class
- CommerceSmartImporerService
- This is main Commerce Smart Importer Service.
Namespace
Drupal\commerce_smart_importer\PluginCode
public function requiredPass(&$field_log, $field_definition) {
if (count($field_log['values']) == 0 && $field_definition['required'] == TRUE) {
$field_log['required'] = FALSE;
$field_log['has_log'] = TRUE;
}
else {
$field_log['required'] = TRUE;
}
}