class MigrateToolsTestCommands in Migrate Tools 8.4
Same name and namespace in other branches
- 8.5 tests/modules/migrate_tools_test/src/Commands/MigrateToolsTestCommands.php \Drupal\migrate_tools_test\Commands\MigrateToolsTestCommands
Migrate Tools Test drush commands.
Hierarchy
- class \Drupal\migrate_tools_test\Commands\MigrateToolsTestCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of MigrateToolsTestCommands
1 string reference to 'MigrateToolsTestCommands'
- drush.services.yml in tests/
modules/ migrate_tools_test/ drush.services.yml - tests/modules/migrate_tools_test/drush.services.yml
1 service uses MigrateToolsTestCommands
- migrate_tools_test.commands in tests/
modules/ migrate_tools_test/ drush.services.yml - \Drupal\migrate_tools_test\Commands\MigrateToolsTestCommands
File
- tests/
modules/ migrate_tools_test/ src/ Commands/ MigrateToolsTestCommands.php, line 13
Namespace
Drupal\migrate_tools_test\CommandsView source
class MigrateToolsTestCommands extends DrushCommands {
/**
* Migration plugin manager service.
*
* @var \Drupal\migrate\Plugin\MigrationPluginManager
*/
protected $migrationPluginManager;
/**
* MigrateToolsTestCommands constructor.
*
* @param \Drupal\migrate\Plugin\MigrationPluginManager $migrationPluginManager
* The Migration Plugin Manager.
*/
public function __construct(MigrationPluginManager $migrationPluginManager) {
parent::__construct();
$this->migrationPluginManager = $migrationPluginManager;
}
/**
* Run a batch import of fruit terms as a test.
*
* @command migrate:batch-import-fruit
*/
public function batchImportFruit() {
$fruit_migration = $this->migrationPluginManager
->createInstance('fruit_terms');
$executable = new MigrateBatchExecutable($fruit_migration, new MigrateMessage());
$executable
->batchImport();
drush_backend_batch_process();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateToolsTestCommands:: |
protected | property | Migration plugin manager service. | |
MigrateToolsTestCommands:: |
public | function | Run a batch import of fruit terms as a test. | |
MigrateToolsTestCommands:: |
public | function | MigrateToolsTestCommands constructor. |