Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SearchPage.php

function SearchPage::values

Same name in this branch
  1. 11.1.x core/modules/search/src/Plugin/migrate/source/d6/SearchPage.php \Drupal\search\Plugin\migrate\source\d6\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\d7

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal