class MigrationConfigDeriver in Migrate Plus 8.5
Same name and namespace in other branches
- 8.4 src/Plugin/MigrationConfigDeriver.php \Drupal\migrate_plus\Plugin\MigrationConfigDeriver
Expose migration entities in the active config store as derivative plugins.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\migrate_plus\Plugin\MigrationConfigDeriver
Expanded class hierarchy of MigrationConfigDeriver
1 string reference to 'MigrationConfigDeriver'
- migration_config_deriver.yml in migrations/
migration_config_deriver.yml - migrations/migration_config_deriver.yml
File
- src/
Plugin/ MigrationConfigDeriver.php, line 11
Namespace
Drupal\migrate_plus\PluginView source
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
MigrationConfigDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |