3 namespace Drupal\search\Plugin\migrate\process;
5 use Drupal\migrate\ProcessPluginBase;
6 use Drupal\migrate\MigrateExecutableInterface;
7 use Drupal\migrate\Row;
10 * Generate configuration rankings.
12 * @MigrateProcessPlugin(
13 * id = "search_configuration_rankings"
16 class SearchConfigurationRankings extends ProcessPluginBase {
21 * Generate the configuration rankings.
23 public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
25 foreach ($row->getSource() as $name => $rank) {
26 if (substr($name, 0, 10) == 'node_rank_' && is_numeric($rank)) {
27 $return[substr($name, 10)] = $rank;