MigrationConfigDeriver.php in Migrate Plus 8.4
File
src/Plugin/MigrationConfigDeriver.php
View source
<?php
namespace Drupal\migrate_plus\Plugin;
use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\migrate_plus\Entity\Migration;
class MigrationConfigDeriver extends DeriverBase {
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives = [];
$migrations = Migration::loadMultiple();
foreach ($migrations as $id => $migration) {
if (!$migration
->status()) {
continue;
}
$this->derivatives[$id] = $migration
->toArray();
}
return $this->derivatives;
}
}