OfficeHoursField.php in Office Hours 8
File
src/Plugin/migrate/field/OfficeHoursField.php
View source
<?php
namespace Drupal\office_hours\Plugin\migrate\field;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
class OfficeHoursField extends FieldPluginBase {
public function getFieldWidgetMap() {
return [
'office_hours' => 'office_hours_default',
];
}
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$this
->defineValueProcessPipeline($migration, $field_name, $data);
}
public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'office_hours_field_plugin',
'source' => $field_name,
];
$migration
->mergeProcessOfProperty($field_name, $process);
}
}
Classes
Name |
Description |
OfficeHoursField |
Plugin annotation
@MigrateCckField(
id = "office_hours_field",
core = {7},
source_module = "office_hours",
destination_module = "office_hours",
type_map = {
"office_hours" = "office_hours"
}
) |