You are here

public function ProfileField::query in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Plugin/migrate/source/ProfileField.php \Drupal\user\Plugin\migrate\source\ProfileField::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/user/src/Plugin/migrate/source/ProfileField.php, line 40
Contains \Drupal\user\Plugin\migrate\source\ProfileField.

Class

ProfileField
Profile field source from database.

Namespace

Drupal\user\Plugin\migrate\source

Code

public function query() {
  if (empty($this->fieldTable) || empty($this->valueTable)) {
    if ($this
      ->getModuleSchemaVersion('system') >= 7000) {
      $this->fieldTable = 'profile_field';
      $this->valueTable = 'profile_value';
    }
    else {
      $this->fieldTable = 'profile_fields';
      $this->valueTable = 'profile_values';
    }
  }
  return $this
    ->select($this->fieldTable, 'pf')
    ->fields('pf');
}