public function MigrateEmailFieldHandler::prepare in Email Field 7
File
- ./
email.migrate.inc, line 13 - Support for the Migrate package.
Class
- MigrateEmailFieldHandler
- @file Support for the Migrate package.
Code
public function prepare($entity, array $field_info, array $instance, array $values) {
// Setup the Field API array for saving.
$arguments = isset($values['arguments']) ? $values['arguments'] : array();
$language = $this
->getFieldLanguage($entity, $field_info, $arguments);
$delta = 0;
foreach ($values as $value) {
$return[$language][$delta]['email'] = $value;
$delta++;
}
return isset($return) ? $return : NULL;
}