You are here

public function ImportingParameters::matchOneFieldLog in Commerce Smart Importer 8

Decides if field should be createf based given parameters.

File

src/ImportingParameters.php, line 114

Class

ImportingParameters
Parameters what will be imported.

Namespace

Drupal\commerce_smart_importer

Code

public function matchOneFieldLog($field_log) {
  if ($field_log['required'] === FALSE) {
    return FALSE;
  }
  if ($this->defaultValues === FALSE && $field_log['default_value'] === FALSE) {
    return FALSE;
  }
  if ($this->exceedsCardinality === FALSE && $field_log['cardinality'] === FALSE) {
    return FALSE;
  }
  if ($this->duplicateValues === FALSE && $field_log['duplicates'] === FALSE) {
    return FALSE;
  }
  if ($this->incorrectValues === FALSE && count($field_log['not_valid'])) {
    return FALSE;
  }
  return TRUE;
}