comparison core/lib/Drupal/Component/Plugin/DependentPluginInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Component\Plugin;
4
5 /**
6 * Provides an interface for a plugin that has dependencies.
7 *
8 * @ingroup plugin_api
9 */
10 interface DependentPluginInterface {
11
12 /**
13 * Calculates dependencies for the configured plugin.
14 *
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.
19 *
20 * @return array
21 * An array of dependencies grouped by type (config, content, module,
22 * theme). For example:
23 * @code
24 * array(
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'),
29 * );
30 * @endcode
31 *
32 * @see \Drupal\Core\Config\Entity\ConfigDependencyManager
33 * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
34 */
35 public function calculateDependencies();
36
37 }