Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MigrationConfigurationTrait.php

function MigrationConfigurationTrait::getState

Gets the state service.

Return value

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

1 call to MigrationConfigurationTrait::getState()
MigrationConfigurationTrait::createDatabaseStateSettings in core/modules/migrate_drupal/src/MigrationConfigurationTrait.php
Creates the necessary state entries for SqlBase::getDatabase() to work.

File

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

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal