class MigrateEmailFieldHandler in Email Field 7
@file Support for the Migrate package.
Hierarchy
- class \MigrateHandler
- class \MigrateFieldHandler
- class \MigrateEmailFieldHandler
- class \MigrateFieldHandler
Expanded class hierarchy of MigrateEmailFieldHandler
1 string reference to 'MigrateEmailFieldHandler'
- email_migrate_api in ./
email.module - Implements hook_migrate_api().
File
- ./
email.migrate.inc, line 7 - Support for the Migrate package.
View source
class MigrateEmailFieldHandler extends MigrateFieldHandler {
public function __construct() {
$this
->registerTypes(array(
'email',
));
}
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateEmailFieldHandler:: |
public | function | ||
MigrateEmailFieldHandler:: |
public | function |
Overrides MigrateHandler:: |
|
MigrateFieldHandler:: |
function | Determine the language of the field. | ||
MigrateHandler:: |
protected | property | List of other handler classes which should be invoked before the current one. | |
MigrateHandler:: |
protected | property | List of "types" handled by this handler. Depending on the kind of handler, these may be destination types, field types, etc. | |
MigrateHandler:: |
public | function | ||
MigrateHandler:: |
public | function | ||
MigrateHandler:: |
public | function | Does this handler handle the given type? | 1 |
MigrateHandler:: |
protected | function | Register a list of types handled by this class |