You are here

public function MigrationGroupFormBase::__construct in Migrate Tools 8

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

Construct the MigrationGroupFormBase.

For simple entity forms, there's no need for a constructor. Our migration group 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/MigrationGroupFormBase.php, line 41
Contains Drupal\migrate_tools\Form\MigrationGroupFormBase.

Class

MigrationGroupFormBase
Class MigrationGroupFormBase.

Namespace

Drupal\migrate_tools\Form

Code

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