You are here

public function PluginSettingsInterface::onDependencyRemoval in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/PluginSettingsInterface.php \Drupal\Core\Field\PluginSettingsInterface::onDependencyRemoval()
  2. 9 core/lib/Drupal/Core/Field/PluginSettingsInterface.php \Drupal\Core\Field\PluginSettingsInterface::onDependencyRemoval()

Informs the plugin that some configuration it depends on will be deleted.

This method allows plugins to keep their configuration up-to-date when a dependency calculated with ::calculateDependencies() is removed. For example, an entity view display contains a formatter having a setting pointing to an arbitrary config entity. When that config entity is deleted, this method is called by the view display to react to the dependency removal by updating its configuration.

This method must return TRUE if the removal event updated the plugin configuration or FALSE otherwise.

Parameters

array $dependencies: An array of dependencies that will be deleted keyed by dependency type. Dependency types are 'config', 'content', 'module' and 'theme'.

Return value

bool TRUE if the plugin configuration has changed, FALSE if not.

See also

\Drupal\Core\Entity\EntityDisplayBase

1 method overrides PluginSettingsInterface::onDependencyRemoval()
PluginSettingsBase::onDependencyRemoval in core/lib/Drupal/Core/Field/PluginSettingsBase.php
Informs the plugin that some configuration it depends on will be deleted.

File

core/lib/Drupal/Core/Field/PluginSettingsInterface.php, line 88

Class

PluginSettingsInterface
Interface definition for plugin with settings.

Namespace

Drupal\Core\Field

Code

public function onDependencyRemoval(array $dependencies);