You are here

protected function Template::calculatePluginDependencies in Workbench Email 2.x

Same name and namespace in other branches
  1. 8 src/Entity/Template.php \Drupal\workbench_email\Entity\Template::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

src/Entity/Template.php, line 205

Class

Template
Defines the Email Template entity.

Namespace

Drupal\workbench_email\Entity

Code

protected function calculatePluginDependencies(PluginInspectionInterface $instance) {

  // Only add dependencies for plugins that are actually configured.
  if (isset($this->recipient_types[$instance
    ->getPluginId()])) {
    parent::calculatePluginDependencies($instance);
  }
}