if (isset($definition['config_dependencies'
])) { $config_dependencies =
$definition['config_dependencies'
];
} } // Add the provider as a dependency, taking into account if it's a module or
// a theme.
if ($provider) { if ($provider === 'core' ||
$this->
moduleHandler()->
moduleExists($provider)) { $dependencies['module'
][] =
$provider;
} elseif ($this->
themeHandler()->
themeExists($provider)) { $dependencies['theme'
][] =
$provider;
} } // Add the config dependencies.
if ($config_dependencies) { $dependencies = NestedArray::
mergeDeep($dependencies,
$config_dependencies);
} // If a plugin is dependent, calculate its dependencies.
if ($instance instanceof DependentPluginInterface &&
$plugin_dependencies =
$instance->
calculateDependencies()) {