public function MigrationConfigDeriver::getDerivativeDefinitions in Migrate Plus 8.4
Same name and namespace in other branches
- 8.5 src/Plugin/MigrationConfigDeriver.php \Drupal\migrate_plus\Plugin\MigrationConfigDeriver::getDerivativeDefinitions()
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides DeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- src/
Plugin/ MigrationConfigDeriver.php, line 16
Class
- MigrationConfigDeriver
- Expose migration entities in the active config store as derivative plugins.
Namespace
Drupal\migrate_plus\PluginCode
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;
}