
| Current Path : /var/www/html_old/abg/web/modules/contrib/migrate_plus/src/Plugin/ |
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_old/abg/web/modules/contrib/migrate_plus/src/Plugin/MigrationConfigDeriver.php |
<?php
namespace Drupal\migrate_plus\Plugin;
use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\migrate_plus\Entity\Migration;
/**
* Expose migration entities in the active config store as derivative plugins.
*/
class MigrationConfigDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
// Always rederive from scratch, because changes may have been made without
// clearing our internal cache.
$this->derivatives = [];
$migrations = Migration::loadMultiple();
/** @var \Drupal\migrate_plus\Entity\MigrationInterface $migration */
foreach ($migrations as $id => $migration) {
if (!$migration->status()) {
continue;
}
$this->derivatives[$id] = $migration->toArray();
}
return $this->derivatives;
}
}