function ProfileField::setTableNames

Same name in other branches
  1. 9 core/modules/user/src/Plugin/migrate/source/ProfileField.php \Drupal\user\Plugin\migrate\source\ProfileField::setTableNames()
  2. 8.9.x core/modules/user/src/Plugin/migrate/source/ProfileField.php \Drupal\user\Plugin\migrate\source\ProfileField::setTableNames()
  3. 11.x core/modules/user/src/Plugin/migrate/source/ProfileField.php \Drupal\user\Plugin\migrate\source\ProfileField::setTableNames()

Helper to set the profile field table names.

2 calls to ProfileField::setTableNames()
ProfileField::checkRequirements in core/modules/user/src/Plugin/migrate/source/ProfileField.php
Checks if requirements for this plugin are OK.
ProfileField::query in core/modules/user/src/Plugin/migrate/source/ProfileField.php

File

core/modules/user/src/Plugin/migrate/source/ProfileField.php, line 120

Class

ProfileField
Drupal 6/7 profile field source from database.

Namespace

Drupal\user\Plugin\migrate\source

Code

protected function setTableNames() {
    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';
        }
    }
}

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