You are here

public function ConfigurablePluginBase::onDependencyRemoval in Search API 8

Informs the plugin that some of its dependencies are being removed.

The plugin should attempt to change its configuration in a way to remove its dependency on those items. However, to avoid problems, it should (as far as possible) not add any new dependencies in the process, since there is no guarantee that those are not currently being removed, too.

Parameters

object[][] $dependencies: An array of dependencies, keyed by dependency type ("module", "config", etc.) and dependency name.

Return value

bool Whether the dependency was successfully removed from the plugin – that is, after the configuration changes that were made, none of the removed items are dependencies of this plugin anymore.

Overrides ConfigurablePluginInterface::onDependencyRemoval

5 methods override ConfigurablePluginBase::onDependencyRemoval()
RenderedItem::onDependencyRemoval in src/Plugin/search_api/processor/RenderedItem.php
Informs the plugin that some of its dependencies are being removed.
TestBackend::onDependencyRemoval in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Informs the plugin that some of its dependencies are being removed.
TestDatasource::onDependencyRemoval in tests/search_api_test/src/Plugin/search_api/datasource/TestDatasource.php
Informs the plugin that some of its dependencies are being removed.
TestProcessor::onDependencyRemoval in tests/search_api_test/src/Plugin/search_api/processor/TestProcessor.php
Informs the plugin that some of its dependencies are being removed.
TestTracker::onDependencyRemoval in tests/search_api_test/src/Plugin/search_api/tracker/TestTracker.php
Informs the plugin that some of its dependencies are being removed.

File

src/Plugin/ConfigurablePluginBase.php, line 95

Class

ConfigurablePluginBase
Provides a base class for all configurable Search API plugins.

Namespace

Drupal\search_api\Plugin

Code

public function onDependencyRemoval(array $dependencies) {

  // By default, we're not reacting to anything and so we should leave
  // everything as it was.
  return FALSE;
}