class MigrateFieldIpaddressFieldHandler in IP address fields 7
Provides a ipaddress FieldHandler for the Migrate module.
Hierarchy
- class \MigrateHandler
- class \MigrateFieldHandler
Expanded class hierarchy of MigrateFieldIpaddressFieldHandler
File
- ./
field_ipaddress.migrate.inc, line 11 - Adding support for the Migrate module.
View source
class MigrateFieldIpaddressFieldHandler extends MigrateFieldHandler {
public function __construct() {
$this
->registerTypes(array(
'field_ipaddress',
));
}
public function prepare($entity, array $field_info, array $instance, array $values) {
$delta = 0;
foreach ($values as $value) {
if (!empty($value['start']) && !empty($value['end'])) {
$return[LANGUAGE_NONE][$delta]['ipaddress']['start'] = $value['start'];
$return[LANGUAGE_NONE][$delta]['ipaddress']['end'] = $value['end'];
$delta++;
}
}
return isset($return) ? $return : NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateFieldHandler:: |
function | Determine the language of the field. | ||
MigrateFieldIpaddressFieldHandler:: |
public | function | ||
MigrateFieldIpaddressFieldHandler:: |
public | function |
Overrides MigrateHandler:: |
|
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 |