You are here

public function LocalStockChecker::__construct in Commerce Stock 8

Constructs the local stock checker.

Parameters

\Drupal\Core\Database\Connection $database: The database connection.

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

File

modules/local_storage/src/LocalStockChecker.php, line 38

Class

LocalStockChecker
The stock checker implementation for the local stock module.

Namespace

Drupal\commerce_stock_local

Code

public function __construct(Connection $database, EntityTypeManagerInterface $entity_type_manager) {
  $this->database = $database;
  $this->locationStorage = $entity_type_manager
    ->getStorage('commerce_stock_location');
}