Mercurial > hg > isophonics-drupal-site
comparison core/modules/migrate/src/Plugin/Migration.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 1fec387a4317 |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
618 $this->migration_dependencies['optional'] = array_unique(array_merge($this->migration_dependencies['optional'], $this->findMigrationDependencies($this->process))); | 618 $this->migration_dependencies['optional'] = array_unique(array_merge($this->migration_dependencies['optional'], $this->findMigrationDependencies($this->process))); |
619 return $this->migration_dependencies; | 619 return $this->migration_dependencies; |
620 } | 620 } |
621 | 621 |
622 /** | 622 /** |
623 * Find migration dependencies from the migration and the iterator plugins. | 623 * Find migration dependencies from migration_lookup and sub_process plugins. |
624 * | 624 * |
625 * @param $process | 625 * @param array $process |
626 * A process configuration array. | |
627 * | |
626 * @return array | 628 * @return array |
629 * The migration dependencies. | |
627 */ | 630 */ |
628 protected function findMigrationDependencies($process) { | 631 protected function findMigrationDependencies($process) { |
629 $return = []; | 632 $return = []; |
630 foreach ($this->getProcessNormalized($process) as $process_pipeline) { | 633 foreach ($this->getProcessNormalized($process) as $process_pipeline) { |
631 foreach ($process_pipeline as $plugin_configuration) { | 634 foreach ($process_pipeline as $plugin_configuration) { |
632 if ($plugin_configuration['plugin'] == 'migration') { | 635 if (in_array($plugin_configuration['plugin'], ['migration', 'migration_lookup'], TRUE)) { |
633 $return = array_merge($return, (array) $plugin_configuration['migration']); | 636 $return = array_merge($return, (array) $plugin_configuration['migration']); |
634 } | 637 } |
635 if ($plugin_configuration['plugin'] == 'sub_process') { | 638 if (in_array($plugin_configuration['plugin'], ['iterator', 'sub_process'], TRUE)) { |
636 $return = array_merge($return, $this->findMigrationDependencies($plugin_configuration['process'])); | 639 $return = array_merge($return, $this->findMigrationDependencies($plugin_configuration['process'])); |
637 } | 640 } |
638 } | 641 } |
639 } | 642 } |
640 return $return; | 643 return $return; |