You are here

public function SearchConfigurationRankings::transform in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/search/src/Plugin/migrate/process/SearchConfigurationRankings.php \Drupal\search\Plugin\migrate\process\SearchConfigurationRankings::transform()
  2. 8 core/modules/search/src/Plugin/migrate/process/d6/SearchConfigurationRankings.php \Drupal\search\Plugin\migrate\process\d6\SearchConfigurationRankings::transform()
Same name and namespace in other branches
  1. 8.0 core/modules/search/src/Plugin/migrate/process/d6/SearchConfigurationRankings.php \Drupal\search\Plugin\migrate\process\d6\SearchConfigurationRankings::transform()

Generate the configuration rankings.

Overrides ProcessPluginBase::transform

File

core/modules/search/src/Plugin/migrate/process/d6/SearchConfigurationRankings.php, line 28
Contains \Drupal\search\Plugin\migrate\process\d6\SearchConfigurationRankings.

Class

SearchConfigurationRankings
Generate configuration rankings.

Namespace

Drupal\search\Plugin\migrate\process\d6

Code

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;
}