You are here

public function OrderPlacedEventSubscriber::__construct in Commerce Reporting 8

Constructs a new OrderPlacedEventSubscriber object.

Parameters

\Drupal\Core\State\StateInterface $state: The state key/value store.

\Drupal\commerce_reports\OrderReportGeneratorInterface $order_report_generator: The order report generator.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

File

src/EventSubscriber/OrderPlacedEventSubscriber.php, line 41

Class

OrderPlacedEventSubscriber
Event subscriber to order placed transition event.

Namespace

Drupal\commerce_reports\EventSubscriber

Code

public function __construct(StateInterface $state, OrderReportGeneratorInterface $order_report_generator) {
  $this->state = $state;
  $this->orderReportGenerator = $order_report_generator;
}