LinkField.php in Drupal 8
File
core/modules/link/src/Plugin/migrate/field/d6/LinkField.php
View source
<?php
namespace Drupal\link\Plugin\migrate\field\d6;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
class LinkField extends FieldPluginBase {
public function getFieldFormatterMap() {
return [
'default' => 'link',
'plain' => 'link',
'absolute' => 'link',
'title_plain' => 'link',
'url' => 'link',
'short' => 'link',
'label' => 'link',
'separate' => 'link_separate',
];
}
public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'field_link',
'source' => $field_name,
];
$migration
->mergeProcessOfProperty($field_name, $process);
}
}
Classes
Name |
Description |
LinkField |
Plugin annotation
@MigrateField(
id = "link",
core = {6},
type_map = {
"link" = "link",
},
source_module = "link",
destination_module = "link"
) |