class MigrateEmvideoFieldHandler in Migrate Extras 6.2
Field handler.
Hierarchy
- class \MigrateHandler
- class \MigrateFieldHandler
- class \MigrateEmvideoFieldHandler
- class \MigrateFieldHandler
Expanded class hierarchy of MigrateEmvideoFieldHandler
File
- ./
emfield.inc, line 28 - Migrate 6.x-2.x Plugin for the Embedded Media Field module as a destination.
View source
class MigrateEmvideoFieldHandler extends MigrateFieldHandler {
public function __construct() {
$this
->registerTypes(array(
'emvideo',
));
}
static function arguments($provider = 'youtube') {
return array(
'provider' => $provider,
);
}
public function prepare($entity, array $instance, array $values) {
$provider = $values['arguments']['provider'];
// Setup the standard Field API array for saving.
$delta = 0;
foreach ($values as $value) {
$item = array();
$item['value'] = basename($value);
$item['embed'] = $value;
$item['provider'] = $provider;
$return[$delta] = $item;
$delta++;
}
return isset($return) ? $return : NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateEmvideoFieldHandler:: |
static | function | ||
MigrateEmvideoFieldHandler:: |
public | function | ||
MigrateEmvideoFieldHandler:: |
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? | |
MigrateHandler:: |
protected | function | Register a list of types handled by this class |