interface DependentWithRemovalPluginInterface (View source)

Provides an interface for a plugin that has dependencies that can be removed.

Methods

bool
onDependencyRemoval(array $dependencies)

Allows a plugin to define whether it should be removed.

Details

bool onDependencyRemoval(array $dependencies)

Allows a plugin to define whether it should be removed.

If this method returns TRUE then the plugin should be removed.

Parameters

array $dependencies

An array of dependencies that will be deleted keyed by dependency type. Dependency types are, for example, entity, module and theme.

Return Value

bool

TRUE if the plugin instance should be removed.

See also

ConfigDependencyManager
\Drupal\Core\Config\ConfigEntityBase::preDelete()
ConfigManager::uninstall
EntityDisplayBase::onDependencyRemoval