'importID' => $currentImportID,
'importTempTable' => $this->_tableName,
'fieldHeaders' => $this->_mapperKeys,
- 'fields' => $this->_activeFields,
];
CRM_Utils_Hook::import('Contact', 'process', $this, $hookParams);
}
return ((int) $this->getSubmittedValue('onDuplicate')) === CRM_Import_Parser::DUPLICATE_FILL;
}
- /**
- * Array of the fields that are actually part of the import process
- * the position in the array also dictates their position in the import
- * file
- * @var array
- */
- protected $_activeFields = [];
-
- /**
- * Cache the count of active fields
- *
- * @var int
- */
- protected $_activeFieldCount;
-
/**
* Cache of preview rows
*
$this->_maxLinesToProcess = 0;
}
- /**
- * Format the field values for input to the api.
- *
- * @return array
- * (reference) associative array of name/value pairs
- */
- public function &getActiveFieldParams() {
- $params = [];
- for ($i = 0; $i < $this->_activeFieldCount; $i++) {
- if (isset($this->_activeFields[$i]->_value)
- && !isset($params[$this->_activeFields[$i]->_name])
- && !isset($this->_activeFields[$i]->_related)
- ) {
-
- $params[$this->_activeFields[$i]->_name] = $this->_activeFields[$i]->_value;
- }
- }
- return $params;
- }
-
/**
* Add progress bar to the import process. Calculates time remaining, status etc.
*