You are here

public function ProfileField::checkRequirements in Drupal 9

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

Checks if requirements for this plugin are OK.

Throws

\Drupal\migrate\Exception\RequirementsException Thrown when requirements are not met.

Overrides DrupalSqlBase::checkRequirements

File

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

Class

ProfileField
Profile field source from database.

Namespace

Drupal\user\Plugin\migrate\source

Code

public function checkRequirements() {
  $this
    ->setTableNames();
  if (!$this
    ->getDatabase()
    ->schema()
    ->tableExists($this->fieldTable)) {

    // If we make it to here, the profile module isn't installed.
    throw new RequirementsException('Profile module not enabled on source site');
  }
  parent::checkRequirements();
}