diff --git a/core/modules/search/src/Plugin/migrate/process/d6/SearchConfigurationRankings.php b/core/modules/search/src/Plugin/migrate/process/d6/SearchConfigurationRankings.php index 206f1f8060..3fc549d987 100644 --- a/core/modules/search/src/Plugin/migrate/process/d6/SearchConfigurationRankings.php +++ b/core/modules/search/src/Plugin/migrate/process/d6/SearchConfigurationRankings.php @@ -2,9 +2,10 @@ namespace Drupal\search\Plugin\migrate\process\d6; -use Drupal\migrate\ProcessPluginBase; -use Drupal\migrate\MigrateExecutableInterface; -use Drupal\migrate\Row; +@trigger_error('SearchConfigurationRankings is deprecated in +Drupal 8.7.x and will be removed before Drupal 9.0.0. Use Drupal\search\Plugin\migrate\process\SearchConfigurationRankings instead.', E_USER_DEPRECATED); + +use Drupal\search\Plugin\migrate\process\SearchConfigurationRankings as CommonSearchConfigurationRankings; /** * Generate configuration rankings. @@ -12,22 +13,8 @@ * @MigrateProcessPlugin( * id = "d6_search_configuration_rankings" * ) + * + * @deprecated in Drupal 8.7.x and will be removed in Drupal 9.0.x. Use + * \Drupal\search\Plugin\migrate\process\SearchConfigurationRankings instead. */ -class SearchConfigurationRankings extends ProcessPluginBase { - - /** - * {@inheritdoc} - * - * Generate the configuration rankings. - */ - public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { - $return = []; - foreach ($row->getSource() as $name => $rank) { - if (substr($name, 0, 10) == 'node_rank_' && $rank) { - $return[substr($name, 10)] = $rank; - } - } - return $return; - } - -} +class SearchConfigurationRankings extends CommonSearchConfigurationRankings {}