function RemovableDependentPluginInterface::onCollectionDependencyRemoval
Informs the plugin in a collection to act on removal of dependencies.
This method allows a plugin instance in a collection to remove dependencies from their configuration. For example, if a plugin integrates with a specific module, it should remove that module from its own configuration when the module is uninstalled.
Parameters
array<string, list<string>> $dependencies: An array of dependencies that will be deleted keyed by dependency type. Dependency types are, for example, entity, module and theme.
Return value
\Drupal\Core\Plugin\RemovableDependentPluginReturn
- RemovableDependentPluginReturn::Changed if the configuration of the plugin instance has changed
- RemovableDependentPluginReturn::Remove if the plugin instance should be removed from the plugin collection
- RemovableDependentPluginReturn::Unchanged if the configuration of the plugin instance has not changed.
3 methods override RemovableDependentPluginInterface::onCollectionDependencyRemoval()
- ImageEffectBase::onCollectionDependencyRemoval in core/
modules/ image/ src/ ImageEffectBase.php - Informs the plugin in a collection to act on removal of dependencies.
- MediaEmbed::onCollectionDependencyRemoval in core/
modules/ media/ src/ Plugin/ Filter/ MediaEmbed.php - Informs the plugin in a collection to act on removal of dependencies.
- TestConfigurablePlugin::onCollectionDependencyRemoval in core/
tests/ Drupal/ Tests/ Core/ Plugin/ Fixtures/ TestConfigurablePlugin.php - Informs the plugin in a collection to act on removal of dependencies.
File
-
core/
lib/ Drupal/ Core/ Plugin/ RemovableDependentPluginInterface.php, line 36
Class
- RemovableDependentPluginInterface
- Provides an interface for plugins that react when dependencies are removed.
Namespace
Drupal\Core\PluginCode
public function onCollectionDependencyRemoval(array $dependencies) : RemovableDependentPluginReturn;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.