annotate core/lib/Drupal/Component/Plugin/DependentPluginInterface.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author |
Chris Cannam |
date |
Mon, 23 Apr 2018 09:46:53 +0100 |
parents |
4c8ae668cc8c |
children |
|
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\Component\Plugin;
|
Chris@0
|
4
|
Chris@0
|
5 /**
|
Chris@0
|
6 * Provides an interface for a plugin that has dependencies.
|
Chris@0
|
7 *
|
Chris@0
|
8 * @ingroup plugin_api
|
Chris@0
|
9 */
|
Chris@0
|
10 interface DependentPluginInterface {
|
Chris@0
|
11
|
Chris@0
|
12 /**
|
Chris@0
|
13 * Calculates dependencies for the configured plugin.
|
Chris@0
|
14 *
|
Chris@0
|
15 * Dependencies are saved in the plugin's configuration entity and are used to
|
Chris@0
|
16 * determine configuration synchronization order. For example, if the plugin
|
Chris@0
|
17 * integrates with specific user roles, this method should return an array of
|
Chris@0
|
18 * dependencies listing the specified roles.
|
Chris@0
|
19 *
|
Chris@0
|
20 * @return array
|
Chris@0
|
21 * An array of dependencies grouped by type (config, content, module,
|
Chris@0
|
22 * theme). For example:
|
Chris@0
|
23 * @code
|
Chris@0
|
24 * array(
|
Chris@0
|
25 * 'config' => array('user.role.anonymous', 'user.role.authenticated'),
|
Chris@0
|
26 * 'content' => array('node:article:f0a189e6-55fb-47fb-8005-5bef81c44d6d'),
|
Chris@0
|
27 * 'module' => array('node', 'user'),
|
Chris@0
|
28 * 'theme' => array('seven'),
|
Chris@0
|
29 * );
|
Chris@0
|
30 * @endcode
|
Chris@0
|
31 *
|
Chris@0
|
32 * @see \Drupal\Core\Config\Entity\ConfigDependencyManager
|
Chris@0
|
33 * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
|
Chris@0
|
34 */
|
Chris@0
|
35 public function calculateDependencies();
|
Chris@0
|
36
|
Chris@0
|
37 }
|