You are here

protected function MigrateExecutable::removeListeners in Migrate Tools 8.2

Same name and namespace in other branches
  1. 8.5 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::removeListeners()
  2. 8 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::removeListeners()
  3. 8.3 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::removeListeners()
  4. 8.4 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::removeListeners()

Clean up all our event listeners.

2 calls to MigrateExecutable::removeListeners()
MigrateExecutable::onPostImport in src/MigrateExecutable.php
React to migration completion.
MigrateExecutable::onPostRollback in src/MigrateExecutable.php
React to rollback completion.

File

src/MigrateExecutable.php, line 231

Class

MigrateExecutable

Namespace

Drupal\migrate_tools

Code

protected function removeListeners() {
  foreach ($this->listeners as $event => $listener) {
    \Drupal::service('event_dispatcher')
      ->removeListener($event, $listener);
  }
}