function Variable::values

Same name in other branches
  1. 9 core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php \Drupal\migrate_drupal\Plugin\migrate\source\Variable::values()
  2. 8.9.x core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php \Drupal\migrate_drupal\Plugin\migrate\source\Variable::values()
  3. 11.x 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 128

Class

Variable
Drupal 6/7 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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.