You are here

public function MigrationFormBase::__construct in Migrate Tools 8

Same name and namespace in other branches
  1. 8.2 src/Form/MigrationFormBase.php \Drupal\migrate_tools\Form\MigrationFormBase::__construct()
  2. 8.3 src/Form/MigrationFormBase.php \Drupal\migrate_tools\Form\MigrationFormBase::__construct()
  3. 8.4 src/Form/MigrationFormBase.php \Drupal\migrate_tools\Form\MigrationFormBase::__construct()

Construct the MigrationGroupFormBase.

For simple entity forms, there's no need for a constructor. Our migration form base, however, requires an entity query factory to be injected into it from the container. We later use this query factory to build an entity query for the exists() method.

Parameters

\Drupal\Core\Entity\Query\QueryFactory $query_factory: An entity query factory for the migration group entity type.

File

src/Form/MigrationFormBase.php, line 42
Contains Drupal\migrate_tools\Form\MigrationFormBase.

Class

MigrationFormBase
Class MigrationFormBase.

Namespace

Drupal\migrate_tools\Form

Code

public function __construct(QueryFactory $query_factory) {
  $this->entityQueryFactory = $query_factory;
}