VideoItem.php in Video 8
File
src/Plugin/migrate/cckfield/VideoItem.php
View source
<?php
namespace Drupal\video\Plugin\migrate\cckfield;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;
class VideoItem extends CckFieldPluginBase {
public function getFieldWidgetMap() {
return [
'video_upload' => 'video_upload',
];
}
public function getFieldFormatterMap() {
return [
'video_formatter_player' => 'video_player_list',
];
}
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'source' => $field_name,
'process' => [
'target_id' => 'fid',
],
];
$migration
->mergeProcessOfProperty($field_name, $process);
}
}
Classes
Name |
Description |
VideoItem |
Plugin annotation
@MigrateCckField(
id = "video",
core = {7}
) |