
| Current Path : /var/www/html/rocksensor3/vendor/drush/drush/src/Drupal/Migrate/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor3/vendor/drush/drush/src/Drupal/Migrate/MigrateRunnerHooks.php |
<?php
declare(strict_types=1);
namespace Drush\Drupal\Migrate;
use Drupal\migrate\Plugin\MigrateSourceInterface;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Psr\EventDispatcher\EventDispatcherInterface;
class MigrateRunnerHooks
{
public function __construct(protected readonly EventDispatcherInterface $eventDispatcher)
{
}
/**
* Implements hook_migrate_prepare_row().
*
* We implement this on behalf of the 'system' module.
*
* @todo Deprecate this hook implementation when #2952291 lands.
* @see https://www.drupal.org/project/drupal/issues/2952291
*/
public function prepareRow(Row $row, MigrateSourceInterface $source, MigrationInterface $migration): void
{
$this->eventDispatcher->dispatch(
new MigratePrepareRowEvent($row, $source, $migration),
MigrateEvents::DRUSH_MIGRATE_PREPARE_ROW,
);
}
}