You are here

public static function SensorPluginInterface::create in Monitoring 8

Creates an instance of the sensor with config.

Similar to ContainerFactoryPluginInterface but with typed config.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.

\Drupal\monitoring\Entity\SensorConfig $sensor_config: The configuration containing information about the sensor instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Return value

static Returns an instance of the sensor.

See also

\Drupal\Core\Plugin\ContainerFactoryPluginInterface

1 method overrides SensorPluginInterface::create()
SensorPluginBase::create in src/SensorPlugin/SensorPluginBase.php
Creates an instance of the sensor with config.

File

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

Class

SensorPluginInterface
Interface for a sensor plugin defining basic operations.

Namespace

Drupal\monitoring\SensorPlugin

Code

public static function create(ContainerInterface $container, SensorConfig $sensor_config, $plugin_id, $plugin_definition);