You are here

protected function FilterFormat::calculatePluginDependencies in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::calculatePluginDependencies()

Calculates and adds dependencies of a specific plugin instance.

Dependencies are added for the module that provides the plugin, as well as any dependencies declared by the instance's calculateDependencies() method, if it implements \Drupal\Component\Plugin\DependentPluginInterface.

Parameters

\Drupal\Component\Plugin\PluginInspectionInterface $instance: The plugin instance.

Overrides PluginDependencyTrait::calculatePluginDependencies

File

core/modules/filter/src/Entity/FilterFormat.php, line 432

Class

FilterFormat
Represents a text format.

Namespace

Drupal\filter\Entity

Code

protected function calculatePluginDependencies(PluginInspectionInterface $instance) {

  // Only add dependencies for plugins that are actually configured. This is
  // necessary because the filter plugin collection will return all available
  // filter plugins.
  // @see \Drupal\filter\FilterPluginCollection::getConfiguration()
  if (isset($this->filters[$instance
    ->getPluginId()])) {
    parent::calculatePluginDependencies($instance);
  }
}