SearchConfigurationRankings.php in Zircon Profile 8.0
File
core/modules/search/src/Plugin/migrate/process/d6/SearchConfigurationRankings.php
View source
<?php
namespace Drupal\search\Plugin\migrate\process\d6;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Row;
class SearchConfigurationRankings extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
$return = array();
foreach ($row
->getSource() as $name => $rank) {
if (substr($name, 0, 10) == 'node_rank_' && $rank) {
$return[substr($name, 10)] = $rank;
}
}
return $return;
}
}