-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDependentPluginInterface.php
37 lines (33 loc) · 1.09 KB
/
DependentPluginInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Drupal\Component\Plugin;
/**
* Provides an interface for a plugin that has dependencies.
*
* @ingroup plugin_api
*/
interface DependentPluginInterface {
/**
* Calculates dependencies for the configured plugin.
*
* Dependencies are saved in the plugin's configuration entity and are used to
* determine configuration synchronization order. For example, if the plugin
* integrates with specific user roles, this method should return an array of
* dependencies listing the specified roles.
*
* @return array
* An array of dependencies grouped by type (config, content, module,
* theme). For example:
* @code
* [
* 'config' => ['user.role.anonymous', 'user.role.authenticated'],
* 'content' => ['node:article:f0a189e6-55fb-47fb-8005-5bef81c44d6d'],
* 'module' => ['node', 'user'],
* 'theme' => ['claro'],
* ];
* @endcode
*
* @see \Drupal\Core\Config\Entity\ConfigDependencyManager
* @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
*/
public function calculateDependencies();
}