You are here

public function CommerceTurnoverSensorPlugin::__construct in Monitoring 8

Instantiates a sensor object.

Parameters

\Drupal\monitoring\Entity\SensorConfig $sensor_config: Sensor config object.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides ContentEntityAggregatorSensorPlugin::__construct

File

src/Plugin/monitoring/SensorPlugin/CommerceTurnoverSensorPlugin.php, line 63

Class

CommerceTurnoverSensorPlugin
Monitors commerce order turnover stats.

Namespace

Drupal\monitoring\Plugin\monitoring\SensorPlugin

Code

public function __construct(SensorConfig $sensor_config, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, CurrencyFormatterInterface $currency_formatter, CurrentStoreInterface $current_store, WorkflowManagerInterface $workflow_manager, DateFormatterInterface $date_formatter) {
  parent::__construct($sensor_config, $plugin_id, $plugin_definition, $entity_type_manager, $entity_field_manager);
  $this->currencyFormatter = $currency_formatter;
  $this->currentStore = $current_store;
  $this->workflowManager = $workflow_manager;
  $this->dateFormatter = $date_formatter;
}