You are here

protected function MigrationConfigurationTrait::getState in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/src/MigrationConfigurationTrait.php \Drupal\migrate_drupal\MigrationConfigurationTrait::getState()
  2. 9 core/modules/migrate_drupal/src/MigrationConfigurationTrait.php \Drupal\migrate_drupal\MigrationConfigurationTrait::getState()

Gets the state service.

Return value

\Drupal\Core\State\StateInterface The state service.

File

core/modules/migrate_drupal/src/MigrationConfigurationTrait.php, line 284

Class

MigrationConfigurationTrait
Configures the appropriate migrations for a given source Drupal database.

Namespace

Drupal\migrate_drupal

Code

protected function getState() {
  if (!$this->state) {
    $this->state = \Drupal::service('state');
  }
  return $this->state;
}