You are here

protected function Variable::values in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php \Drupal\migrate_drupal\Plugin\migrate\source\Variable::values()

Return the values of the variables specified in the plugin configuration.

Return value

array An associative array where the keys are the variables specified in the plugin configuration and the values are the values found in the source. Only those values are returned that are actually in the database.

5 calls to Variable::values()
ContactSettings::initializeIterator in core/modules/contact/src/Plugin/migrate/source/ContactSettings.php
Initializes the iterator with the source data.
SearchPage::values in core/modules/search/src/Plugin/migrate/source/d6/SearchPage.php
Return the values of the variables specified in the plugin configuration.
SearchPage::values in core/modules/search/src/Plugin/migrate/source/d7/SearchPage.php
Return the values of the variables specified in the plugin configuration.
UpdateSettings::values in core/modules/update/src/Plugin/migrate/source/UpdateSettings.php
Return the values of the variables specified in the plugin configuration.
Variable::initializeIterator in core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php
Initializes the iterator with the source data.
3 methods override Variable::values()
SearchPage::values in core/modules/search/src/Plugin/migrate/source/d6/SearchPage.php
Return the values of the variables specified in the plugin configuration.
SearchPage::values in core/modules/search/src/Plugin/migrate/source/d7/SearchPage.php
Return the values of the variables specified in the plugin configuration.
UpdateSettings::values in core/modules/update/src/Plugin/migrate/source/UpdateSettings.php
Return the values of the variables specified in the plugin configuration.

File

core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php, line 127

Class

Variable
Drupal variable source from database.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

protected function values() {

  // Create an ID field so we can record migration in the map table.
  // Arbitrarily, use the first variable name.
  $values['id'] = reset($this->variables);
  return $values + array_map('unserialize', $this
    ->prepareQuery()
    ->execute()
    ->fetchAllKeyed());
}