protected function getPluginDependencies(PluginInspectionInterface
$instance) { $dependencies =
[];
$definition =
$instance->
getPluginDefinition();
$provider = NULL;
$config_dependencies =
[];
if ($definition instanceof PluginDefinitionInterface
) { $provider =
$definition->
getProvider();
if ($definition instanceof DependentPluginDefinitionInterface
) { $config_dependencies =
$definition->
getConfigDependencies();
} } elseif (is_array($definition)) { $provider =
$definition['provider'
];
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