protected function MigrateGeofieldFieldHandler::prepareArguments in Geofield 7.2
Builds an array with additional data for the current $delta.
Parameters
array $arguments: Arguments.
array $field_info: Info for the field.
int $delta: Order of value (typically for multi-valued fields).
Return value
array Array with additional data.
File
- ./
geofield.migrate.inc, line 152 - Support for migration into Geofield fields.
Class
- MigrateGeofieldFieldHandler
- Primary value passed to this field must be the Geometry type string.
Code
protected function prepareArguments(array $arguments, array $field_info, $delta) {
$result = array();
foreach ($arguments as $column_key => $column_value) {
$value = NULL;
if (is_array($arguments[$column_key])) {
if (!empty($arguments[$column_key][$delta])) {
$value = $arguments[$column_key][$delta];
}
}
else {
$value = $arguments[$column_key];
}
if ($value && isset($field_info['columns'][$column_key])) {
$result[$column_key] = $value;
}
}
return $result;
}