You are here

public function OrderReportGenerator::__construct in Commerce Reporting 8

Constructs a new OrderReportGenerator object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\commerce_reports\ReportTypeManager $report_type_manager: The order report type manager.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

File

src/OrderReportGenerator.php, line 43

Class

OrderReportGenerator
Generates order reports for orders.

Namespace

Drupal\commerce_reports

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, ReportTypeManager $report_type_manager) {
  $this->orderStorage = $entity_type_manager
    ->getStorage('commerce_order');
  $this->orderReportStorage = $entity_type_manager
    ->getStorage('commerce_order_report');
  $this->reportTypeManager = $report_type_manager;
}