Skip to main content
added 34 characters in body
Source Link
Akalam
  • 241
  • 3
  • 4

From Drush 9 and higher drush commands are symfony services, so you can load them as other services though the services container. example:

if (PHP_SAPI === 'cli') { $command = \Drupal::service('migrate_tools.commands');  $command->import('my_migration', ['update' => TRUE, 'sync' => TRUE]); } 

From Drush 9 and higher drush commands are symfony services, so you can load them as other services though the services container. example:

$command = \Drupal::service('migrate_tools.commands'); $command->import('my_migration', ['update' => TRUE, 'sync' => TRUE]); 

From Drush 9 and higher drush commands are symfony services, so you can load them as other services though the services container. example:

if (PHP_SAPI === 'cli') { $command = \Drupal::service('migrate_tools.commands');  $command->import('my_migration', ['update' => TRUE, 'sync' => TRUE]); } 
Source Link
Akalam
  • 241
  • 3
  • 4

From Drush 9 and higher drush commands are symfony services, so you can load them as other services though the services container. example:

$command = \Drupal::service('migrate_tools.commands'); $command->import('my_migration', ['update' => TRUE, 'sync' => TRUE]);