function SearchPage::values
Same name in this branch
- 11.x core/modules/search/src/Plugin/migrate/source/d6/SearchPage.php \Drupal\search\Plugin\migrate\source\d6\SearchPage::values()
Same name in other branches
- 9 core/modules/search/src/Plugin/migrate/source/d6/SearchPage.php \Drupal\search\Plugin\migrate\source\d6\SearchPage::values()
- 9 core/modules/search/src/Plugin/migrate/source/d7/SearchPage.php \Drupal\search\Plugin\migrate\source\d7\SearchPage::values()
- 8.9.x core/modules/search/src/Plugin/migrate/source/d6/SearchPage.php \Drupal\search\Plugin\migrate\source\d6\SearchPage::values()
- 8.9.x core/modules/search/src/Plugin/migrate/source/d7/SearchPage.php \Drupal\search\Plugin\migrate\source\d7\SearchPage::values()
- 10 core/modules/search/src/Plugin/migrate/source/d6/SearchPage.php \Drupal\search\Plugin\migrate\source\d6\SearchPage::values()
- 10 core/modules/search/src/Plugin/migrate/source/d7/SearchPage.php \Drupal\search\Plugin\migrate\source\d7\SearchPage::values()
Overrides Variable::values
1 call to SearchPage::values()
- SearchPage::initializeIterator in core/
modules/ search/ src/ Plugin/ migrate/ source/ d7/ SearchPage.php - Initializes the iterator with the source data.
File
-
core/
modules/ search/ src/ Plugin/ migrate/ source/ d7/ SearchPage.php, line 34
Class
- SearchPage
- Drupal 7 search active core modules and rankings source from database.
Namespace
Drupal\search\Plugin\migrate\source\d7Code
protected function values() {
$search_active_modules = $this->variableGet('search_active_modules', '');
$values = [];
foreach ([
'node',
'user',
] as $module) {
if (isset($search_active_modules[$module])) {
// Add a module key to identify the source search provider. This value
// is used in the EntitySearchPage destination plugin.
$tmp = [
'module' => $module,
'status' => $search_active_modules[$module],
];
// Add the node_rank_* variables (only relevant to the node module).
if ($module === 'node') {
$tmp = array_merge($tmp, parent::values());
}
$values[] = $tmp;
}
}
return $values;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.