You are here

public function SensorPluginInterface::calculateDependencies in Monitoring 8

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.

array(
  'entity' => array(
    'user.role.anonymous',
    'user.role.authenticated',
  ),
  'module' => array(
    'node',
    'user',
  ),
  'theme' => array(
    'seven',
  ),
);

Return value

array An array of dependencies grouped by type (module, theme, entity). For example:

See also

\Drupal\Core\Config\Entity\ConfigDependencyManager

\Drupal\Core\Config\Entity\ConfigEntityInterface::getConfigDependencyName()

1 method overrides SensorPluginInterface::calculateDependencies()
SensorPluginBase::calculateDependencies in src/SensorPlugin/SensorPluginBase.php
Calculates dependencies for the configured plugin.

File

src/SensorPlugin/SensorPluginInterface.php, line 159
Contains \Drupal\monitoring\SensorPlugin\SensorPluginInterface.

Class

SensorPluginInterface
Interface for a sensor plugin defining basic operations.

Namespace

Drupal\monitoring\SensorPlugin

Code

public function calculateDependencies();