3 namespace Drupal\Component\Plugin;
6 * Provides an interface for a plugin that has dependencies.
10 interface DependentPluginInterface {
13 * Calculates dependencies for the configured plugin.
15 * Dependencies are saved in the plugin's configuration entity and are used to
16 * determine configuration synchronization order. For example, if the plugin
17 * integrates with specific user roles, this method should return an array of
18 * dependencies listing the specified roles.
21 * An array of dependencies grouped by type (config, content, module,
22 * theme). For example:
25 * 'config' => array('user.role.anonymous', 'user.role.authenticated'),
26 * 'content' => array('node:article:f0a189e6-55fb-47fb-8005-5bef81c44d6d'),
27 * 'module' => array('node', 'user'),
28 * 'theme' => array('seven'),
32 * @see \Drupal\Core\Config\Entity\ConfigDependencyManager
33 * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
35 public function calculateDependencies();