public function Migration::calculateDependencies in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/src/Entity/Migration.php \Drupal\migrate\Entity\Migration::calculateDependencies()
Calculates dependencies and stores them in the dependency property.
Return value
$this
Overrides ConfigEntityBase::calculateDependencies
See also
\Drupal\Core\Config\Entity\ConfigDependencyManager
File
- core/
modules/ migrate/ src/ Entity/ Migration.php, line 584 - Contains \Drupal\migrate\Entity\Migration.
Class
- Migration
- Defines the Migration entity.
Namespace
Drupal\migrate\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
$this
->calculatePluginDependencies($this
->getSourcePlugin());
$this
->calculatePluginDependencies($this
->getDestinationPlugin());
// Add hard dependencies on required migrations.
$dependencies = $this
->getEntityManager()
->getStorage($this->entityTypeId)
->getVariantIds($this
->getMigrationDependencies()['required']);
foreach ($dependencies as $dependency) {
$this
->addDependency('config', $this
->getEntityType()
->getConfigPrefix() . '.' . $dependency);
}
return $this;
}