LinkField.php in Drupal 8
File
core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php
View source
<?php
namespace Drupal\link\Plugin\migrate\cckfield\d7;
@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\\d7\\LinkField instead.', E_USER_DEPRECATED);
use Drupal\link\Plugin\migrate\cckfield\LinkField as D6LinkField;
use Drupal\migrate\Plugin\MigrationInterface;
class LinkField extends D6LinkField {
public function getFieldWidgetMap() {
return [
'link_field' => 'link_default',
];
}
public function alterFieldInstanceMigration(MigrationInterface $migration) {
$process = [
'plugin' => 'static_map',
'source' => 'settings/title',
'bypass' => TRUE,
'map' => [
'disabled' => DRUPAL_DISABLED,
'optional' => DRUPAL_OPTIONAL,
'required' => DRUPAL_REQUIRED,
],
];
$migration
->mergeProcessOfProperty('settings/title', $process);
}
}
Classes
Name |
Description |
LinkField Deprecated |
@MigrateCckField(
id = "link_field",
core = {7},
type_map = {
"link_field" = "link"
},
source_module = "link",
destination_module = "link"
) |