Skip to content
Snippets Groups Projects
Commit a47d8c49 authored by catch's avatar catch
Browse files

Issue #2896507 by heddn, maxocub: Update FieldPluginBase with a default...

Issue #2896507 by heddn, maxocub: Update FieldPluginBase with a default processFieldValues() and getFieldFormatterMap()
parent 845b1c6c
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Showing
with 19 additions and 91 deletions
...@@ -30,15 +30,6 @@ public function getFieldWidgetMap() { ...@@ -30,15 +30,6 @@ public function getFieldWidgetMap() {
]; ];
} }
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
// See d6_field_formatter_settings.yml, d7_field_formatter_settings.yml and
// FieldPluginBase::processFieldFormatter().
return [];
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -35,15 +35,6 @@ public function getFieldWidgetMap() { ...@@ -35,15 +35,6 @@ public function getFieldWidgetMap() {
]; ];
} }
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
// See d6_field_formatter_settings.yml and
// FieldPluginBase::processFieldFormatter().
return [];
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -13,13 +13,6 @@ ...@@ -13,13 +13,6 @@
*/ */
class ImageField extends CckFieldPluginBase { class ImageField extends CckFieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -45,6 +45,13 @@ public function processFieldWidget(MigrationInterface $migration) { ...@@ -45,6 +45,13 @@ public function processFieldWidget(MigrationInterface $migration) {
$migration->mergeProcessOfProperty('options/type', $process); $migration->mergeProcessOfProperty('options/type', $process);
} }
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
...@@ -66,6 +73,17 @@ public function processFieldFormatter(MigrationInterface $migration) { ...@@ -66,6 +73,17 @@ public function processFieldFormatter(MigrationInterface $migration) {
$migration->mergeProcessOfProperty('options/type', $process); $migration->mergeProcessOfProperty('options/type', $process);
} }
/**
* {@inheritdoc}
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'get',
'source' => $field_name,
];
$migration->mergeProcessOfProperty($field_name, $process);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -15,13 +15,6 @@ ...@@ -15,13 +15,6 @@
*/ */
class NodeReference extends FieldPluginBase { class NodeReference extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -15,13 +15,6 @@ ...@@ -15,13 +15,6 @@
*/ */
class UserReference extends FieldPluginBase { class UserReference extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -16,11 +16,6 @@ ...@@ -16,11 +16,6 @@
*/ */
class D6FileField extends CckFieldPluginBase { class D6FileField extends CckFieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -12,11 +12,6 @@ ...@@ -12,11 +12,6 @@
*/ */
class D6NoCoreVersionSpecified extends CckFieldPluginBase { class D6NoCoreVersionSpecified extends CckFieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -13,13 +13,6 @@ ...@@ -13,13 +13,6 @@
*/ */
class FileField extends CckFieldPluginBase { class FileField extends CckFieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace Drupal\migrate_field_plugin_manager_test\Plugin\migrate\field; namespace Drupal\migrate_field_plugin_manager_test\Plugin\migrate\field;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase; use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
use Drupal\migrate\Plugin\MigrationInterface;
/** /**
* @MigrateField( * @MigrateField(
...@@ -14,18 +13,4 @@ ...@@ -14,18 +13,4 @@
* } * }
* ) * )
*/ */
class D6FileField extends FieldPluginBase { class D6FileField extends FieldPluginBase {}
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/**
* {@inheritdoc}
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {}
}
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace Drupal\migrate_field_plugin_manager_test\Plugin\migrate\field; namespace Drupal\migrate_field_plugin_manager_test\Plugin\migrate\field;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase; use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
use Drupal\migrate\Plugin\MigrationInterface;
/** /**
* @MigrateField( * @MigrateField(
...@@ -12,16 +11,5 @@ ...@@ -12,16 +11,5 @@
*/ */
class D6NoCoreVersionSpecified extends FieldPluginBase { class D6NoCoreVersionSpecified extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/**
* {@inheritdoc}
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {}
} }
...@@ -16,13 +16,6 @@ ...@@ -16,13 +16,6 @@
*/ */
class TaxonomyTermReference extends CckFieldPluginBase { class TaxonomyTermReference extends CckFieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment