LinkField.php in Drupal 8
File
core/modules/link/src/Plugin/migrate/cckfield/LinkField.php
View source
<?php
namespace Drupal\link\Plugin\migrate\cckfield;
@trigger_error('LinkField is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \\Drupal\\link\\Plugin\\migrate\\field\\d6\\LinkField instead.', E_USER_DEPRECATED);
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;
class LinkField extends CckFieldPluginBase {
public function getFieldFormatterMap() {
return [
'default' => 'link',
'plain' => 'link',
'absolute' => 'link',
'title_plain' => 'link',
'url' => 'link',
'short' => 'link',
'label' => 'link',
'separate' => 'link_separate',
];
}
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'd6_cck_link',
'source' => $field_name,
];
$migration
->mergeProcessOfProperty($field_name, $process);
}
}
Classes
Name |
Description |
LinkField Deprecated |
Plugin annotation
@MigrateCckField(
id = "link",
core = {6},
type_map = {
"link_field" = "link"
},
source_module = "link",
destination_module = "link"
) |