Issue #3114974 by andypost, kishor_kolekar, mikelutz, alexpott: \Drupal\migrate\Plugin\MigrateDestinationInterface::fields() $migration argument is deprecated
parent
a050029323
commit
9cf5c69157
|
@ -67,7 +67,7 @@ class BlockedIp extends DestinationBase implements ContainerFactoryPluginInterfa
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
return [
|
||||
'ip' => $this->t('The blocked IP address.'),
|
||||
];
|
||||
|
|
|
@ -83,7 +83,7 @@ class Color extends DestinationBase implements ContainerFactoryPluginInterface {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
@ -83,14 +83,11 @@ interface MigrateDestinationInterface extends PluginInspectionInterface {
|
|||
* Derived classes must implement fields(), returning a list of available
|
||||
* destination fields.
|
||||
*
|
||||
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
|
||||
* Unused, will be removed before Drupal 9.0.x. Defaults to NULL.
|
||||
*
|
||||
* @return array
|
||||
* - Keys: machine names of the fields
|
||||
* - Values: Human-friendly descriptions of the fields.
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL);
|
||||
public function fields();
|
||||
|
||||
/**
|
||||
* Import the row.
|
||||
|
|
|
@ -96,7 +96,7 @@ abstract class ComponentEntityDisplayBase extends DestinationBase implements Con
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
// This is intentionally left empty.
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ class Config extends DestinationBase implements ContainerFactoryPluginInterface,
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
// @todo Dynamically fetch fields using Config Schema API.
|
||||
}
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
// TODO: Implement fields() method.
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Drupal\migrate\Plugin\migrate\destination;
|
||||
|
||||
use Drupal\migrate\Plugin\MigrationInterface;
|
||||
use Drupal\migrate\Row;
|
||||
|
||||
/**
|
||||
|
@ -25,7 +24,7 @@ class NullDestination extends DestinationBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Drupal\migrate_events_test\Plugin\migrate\destination;
|
||||
|
||||
use Drupal\migrate\Plugin\MigrationInterface;
|
||||
use Drupal\migrate\Plugin\migrate\destination\DestinationBase;
|
||||
use Drupal\migrate\Row;
|
||||
|
||||
|
@ -25,7 +24,7 @@ class DummyDestination extends DestinationBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
return ['value' => 'Dummy value'];
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ class ShortcutSetUsers extends DestinationBase implements ContainerFactoryPlugin
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
return [
|
||||
'uid' => 'The users.uid for this set.',
|
||||
'source' => 'The shortcut_set.set_name that will be displayed for this user.',
|
||||
|
|
|
@ -68,7 +68,7 @@ class NodeCounter extends DestinationBase implements ContainerFactoryPluginInter
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
return [
|
||||
'nid' => $this->t('The ID of the node to which these statistics apply.'),
|
||||
'totalcount' => $this->t('The total number of times the node has been viewed.'),
|
||||
|
|
|
@ -86,7 +86,7 @@ class ThemeSettings extends DestinationBase implements ContainerFactoryPluginInt
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
// Theme settings vary by theme, so no specific fields are defined.
|
||||
return [];
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ class UserData extends DestinationBase implements ContainerFactoryPluginInterfac
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields(MigrationInterface $migration = NULL) {
|
||||
public function fields() {
|
||||
return [
|
||||
'uid' => 'The user id.',
|
||||
'module' => 'The module name responsible for the settings.',
|
||||
|
|
Loading…
Reference in New Issue